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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/shell/content/client/shell_browser_main_parts.h" | 9 #include "ash/shell/content/client/shell_browser_main_parts.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "content/shell/browser/shell_browser_context.h" | |
12 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
13 | 12 |
14 namespace ash { | 13 namespace ash { |
15 namespace shell { | 14 namespace shell { |
16 | 15 |
17 ShellContentBrowserClient::ShellContentBrowserClient() | 16 ShellContentBrowserClient::ShellContentBrowserClient() |
18 : shell_browser_main_parts_(nullptr) {} | 17 : shell_browser_main_parts_(nullptr) {} |
19 | 18 |
20 ShellContentBrowserClient::~ShellContentBrowserClient() {} | 19 ShellContentBrowserClient::~ShellContentBrowserClient() {} |
21 | 20 |
22 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 21 content::BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
23 const content::MainFunctionParams& parameters) { | 22 const content::MainFunctionParams& parameters) { |
24 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 23 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
25 return shell_browser_main_parts_; | 24 return shell_browser_main_parts_; |
26 } | 25 } |
27 | 26 |
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 std::move(request_interceptors)); | |
36 } | |
37 | |
38 content::ShellBrowserContext* ShellContentBrowserClient::browser_context() { | |
39 return shell_browser_main_parts_->browser_context(); | |
40 } | |
41 | |
42 } // namespace examples | 27 } // namespace examples |
43 } // namespace views | 28 } // namespace views |
OLD | NEW |