OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/shell/content_client/shell_content_browser_client.h" | 5 #include "ash/shell/content_client/shell_content_browser_client.h" |
6 | 6 |
7 #include "ash/shell/content_client/shell_browser_main_parts.h" | 7 #include "ash/shell/content_client/shell_browser_main_parts.h" |
| 8 #include "content/shell/shell_browser_context.h" |
8 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
9 | 10 |
10 namespace ash { | 11 namespace ash { |
11 namespace shell { | 12 namespace shell { |
12 | 13 |
13 ShellContentBrowserClient::ShellContentBrowserClient() | 14 ShellContentBrowserClient::ShellContentBrowserClient() |
14 : shell_browser_main_parts_(NULL) { | 15 : shell_browser_main_parts_(NULL) { |
15 } | 16 } |
16 | 17 |
17 ShellContentBrowserClient::~ShellContentBrowserClient() { | 18 ShellContentBrowserClient::~ShellContentBrowserClient() { |
18 } | 19 } |
19 | 20 |
20 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 21 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
21 const content::MainFunctionParams& parameters) { | 22 const content::MainFunctionParams& parameters) { |
22 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 23 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
23 return shell_browser_main_parts_; | 24 return shell_browser_main_parts_; |
24 } | 25 } |
25 | 26 |
| 27 net::URLRequestContextGetter* ShellContentBrowserClient::CreateRequestContext( |
| 28 content::BrowserContext* content_browser_context, |
| 29 content::ProtocolHandlerMap* protocol_handlers) { |
| 30 content::ShellBrowserContext* shell_context = |
| 31 static_cast<content::ShellBrowserContext*>(content_browser_context); |
| 32 return shell_context->CreateRequestContext(protocol_handlers); |
| 33 } |
| 34 |
26 content::ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 35 content::ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
27 return shell_browser_main_parts_->browser_context(); | 36 return shell_browser_main_parts_->browser_context(); |
28 } | 37 } |
29 | 38 |
30 } // namespace examples | 39 } // namespace examples |
31 } // namespace views | 40 } // namespace views |
OLD | NEW |