Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ash / shell / content_client / shell_content_browser_client.cc
blobd75e759a5ebcf170080c0e1d559431be76440457
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/shell/content_client/shell_content_browser_client.h"
7 #include "ash/shell/content_client/shell_browser_main_parts.h"
8 #include "base/command_line.h"
9 #include "content/shell/browser/shell_browser_context.h"
10 #include "third_party/skia/include/core/SkBitmap.h"
12 namespace ash {
13 namespace shell {
15 ShellContentBrowserClient::ShellContentBrowserClient()
16 : shell_browser_main_parts_(nullptr) {
19 ShellContentBrowserClient::~ShellContentBrowserClient() {
22 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
23 const content::MainFunctionParams& parameters) {
24 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters);
25 return shell_browser_main_parts_;
28 net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext(
29 content::BrowserContext* content_browser_context,
30 content::ProtocolHandlerMap* protocol_handlers,
31 content::URLRequestInterceptorScopedVector request_interceptors) {
32 content::ShellBrowserContext* shell_context =
33 static_cast<content::ShellBrowserContext*>(content_browser_context);
34 return shell_context->CreateRequestContext(protocol_handlers,
35 request_interceptors.Pass());
38 content::ShellBrowserContext* ShellContentBrowserClient::browser_context() {
39 return shell_browser_main_parts_->browser_context();
42 } // namespace examples
43 } // namespace views