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/shell/shell.h" | 9 #include "content/shell/shell.h" |
10 #include "content/shell/shell_browser_main.h" | 10 #include "content/shell/shell_browser_main.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 ShellContentBrowserClient::~ShellContentBrowserClient() { | 33 ShellContentBrowserClient::~ShellContentBrowserClient() { |
34 } | 34 } |
35 | 35 |
36 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( | 36 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( |
37 const content::MainFunctionParams& parameters) { | 37 const content::MainFunctionParams& parameters) { |
38 return new ShellBrowserMainParts(parameters); | 38 return new ShellBrowserMainParts(parameters); |
39 } | 39 } |
40 | 40 |
41 WebContentsView* ShellContentBrowserClient::CreateWebContentsView( | 41 WebContentsView* ShellContentBrowserClient::OverrideCreateWebContentsView( |
42 WebContents* web_contents) { | 42 WebContents* web_contents) { |
43 ShellDevToolsDelegate* devtools_delegate = | 43 ShellDevToolsDelegate* devtools_delegate = |
44 shell_browser_main_parts_->devtools_delegate(); | 44 shell_browser_main_parts_->devtools_delegate(); |
45 if (devtools_delegate) | 45 if (devtools_delegate) |
46 devtools_delegate->AddWebContents(web_contents); | 46 devtools_delegate->AddWebContents(web_contents); |
| 47 return NULL; |
| 48 } |
47 | 49 |
48 #if defined(OS_WIN) | 50 WebContentsViewDelegate* ShellContentBrowserClient::GetWebContentsViewDelegate( |
49 return new TabContentsViewWin(web_contents, NULL); | 51 content::WebContents* web_contents) { |
50 #elif defined(OS_LINUX) | |
51 return new TabContentsViewGtk(web_contents, NULL); | |
52 #elif defined(OS_MACOSX) | |
53 return web_contents_view_mac::CreateWebContentsView(web_contents, NULL); | |
54 #else | |
55 return NULL; | 52 return NULL; |
56 #endif | |
57 } | 53 } |
58 | 54 |
59 void ShellContentBrowserClient::RenderViewHostCreated( | 55 void ShellContentBrowserClient::RenderViewHostCreated( |
60 RenderViewHost* render_view_host) { | 56 RenderViewHost* render_view_host) { |
61 new ShellRenderViewHostObserver(render_view_host); | 57 new ShellRenderViewHostObserver(render_view_host); |
62 } | 58 } |
63 | 59 |
64 void ShellContentBrowserClient::RenderProcessHostCreated( | 60 void ShellContentBrowserClient::RenderProcessHostCreated( |
65 RenderProcessHost* host) { | 61 RenderProcessHost* host) { |
66 } | 62 } |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 #endif | 349 #endif |
354 | 350 |
355 #if defined(USE_NSS) | 351 #if defined(USE_NSS) |
356 crypto::CryptoModuleBlockingPasswordDelegate* | 352 crypto::CryptoModuleBlockingPasswordDelegate* |
357 ShellContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { | 353 ShellContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { |
358 return NULL; | 354 return NULL; |
359 } | 355 } |
360 #endif | 356 #endif |
361 | 357 |
362 } // namespace content | 358 } // namespace content |
OLD | NEW |