| 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 "content/shell/shell_content_browser_client.h" | 5 #include "content/shell/shell_content_browser_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "content/public/browser/resource_dispatcher_host.h" | 9 #include "content/public/browser/resource_dispatcher_host.h" |
| 10 #include "content/shell/shell.h" | 10 #include "content/shell/shell.h" |
| 11 #include "content/shell/shell_browser_main_parts.h" | 11 #include "content/shell/shell_browser_main_parts.h" |
| 12 #include "content/shell/shell_devtools_delegate.h" | 12 #include "content/shell/shell_devtools_delegate.h" |
| 13 #include "content/shell/shell_render_view_host_observer.h" | 13 #include "content/shell/shell_render_view_host_observer.h" |
| 14 #include "content/shell/shell_resource_dispatcher_host_delegate.h" | 14 #include "content/shell/shell_resource_dispatcher_host_delegate.h" |
| 15 #include "content/shell/shell_switches.h" | 15 #include "content/shell/shell_switches.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
| 18 | 18 |
| 19 #if defined(OS_ANDROID) |
| 20 #include "content/shell/shell_browser_main_parts_android.h" |
| 21 #endif |
| 22 |
| 19 namespace content { | 23 namespace content { |
| 20 | 24 |
| 21 ShellContentBrowserClient::ShellContentBrowserClient() | 25 ShellContentBrowserClient::ShellContentBrowserClient() |
| 22 : shell_browser_main_parts_(NULL) { | 26 : shell_browser_main_parts_(NULL) { |
| 23 } | 27 } |
| 24 | 28 |
| 25 ShellContentBrowserClient::~ShellContentBrowserClient() { | 29 ShellContentBrowserClient::~ShellContentBrowserClient() { |
| 26 } | 30 } |
| 27 | 31 |
| 28 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 32 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
| 29 const content::MainFunctionParams& parameters) { | 33 const content::MainFunctionParams& parameters) { |
| 30 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); | 34 #if defined(OS_ANDROID) |
| 35 shell_browser_main_parts_ = new ShellBrowserMainPartsAndroid(parameters); |
| 36 #else |
| 37 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); |
| 38 #endif |
| 31 return shell_browser_main_parts_; | 39 return shell_browser_main_parts_; |
| 32 } | 40 } |
| 33 | 41 |
| 34 WebContentsView* ShellContentBrowserClient::OverrideCreateWebContentsView( | 42 WebContentsView* ShellContentBrowserClient::OverrideCreateWebContentsView( |
| 35 WebContents* web_contents) { | 43 WebContents* web_contents) { |
| 36 return NULL; | 44 return NULL; |
| 37 } | 45 } |
| 38 | 46 |
| 39 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( | 47 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( |
| 40 content::WebContents* web_contents) { | 48 content::WebContents* web_contents) { |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 ShellContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { | 360 ShellContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { |
| 353 return NULL; | 361 return NULL; |
| 354 } | 362 } |
| 355 #endif | 363 #endif |
| 356 | 364 |
| 357 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 365 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
| 358 return shell_browser_main_parts_->browser_context(); | 366 return shell_browser_main_parts_->browser_context(); |
| 359 } | 367 } |
| 360 | 368 |
| 361 } // namespace content | 369 } // namespace content |
| OLD | NEW |