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