Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ash / shell / content_client / shell_content_browser_client.cc
blobf7787872c6553b6570cb119b5157fefb24b6fe16
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 "content/shell/browser/shell_browser_context.h"
9 #include "third_party/skia/include/core/SkBitmap.h"
11 namespace ash {
12 namespace shell {
14 ShellContentBrowserClient::ShellContentBrowserClient()
15 : shell_browser_main_parts_(NULL) {
18 ShellContentBrowserClient::~ShellContentBrowserClient() {
21 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
22 const content::MainFunctionParams& parameters) {
23 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters);
24 return shell_browser_main_parts_;
27 net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext(
28 content::BrowserContext* content_browser_context,
29 content::ProtocolHandlerMap* protocol_handlers,
30 content::URLRequestInterceptorScopedVector request_interceptors) {
31 content::ShellBrowserContext* shell_context =
32 static_cast<content::ShellBrowserContext*>(content_browser_context);
33 return shell_context->CreateRequestContext(protocol_handlers,
34 request_interceptors.Pass());
37 content::ShellBrowserContext* ShellContentBrowserClient::browser_context() {
38 return shell_browser_main_parts_->browser_context();
41 } // namespace examples
42 } // namespace views