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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_mac.h" | 101 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_mac.h" |
102 #elif defined(OS_CHROMEOS) | 102 #elif defined(OS_CHROMEOS) |
103 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 103 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
104 #include "chrome/browser/chromeos/login/user_manager.h" | 104 #include "chrome/browser/chromeos/login/user_manager.h" |
105 #elif defined(OS_LINUX) || defined(OS_OPENBSD) | 105 #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
106 #include "chrome/browser/chrome_browser_main_linux.h" | 106 #include "chrome/browser/chrome_browser_main_linux.h" |
107 #elif defined(OS_POSIX) | 107 #elif defined(OS_POSIX) |
108 #include "chrome/browser/chrome_browser_main_posix.h" | 108 #include "chrome/browser/chrome_browser_main_posix.h" |
109 #endif | 109 #endif |
110 | 110 |
111 #if defined(OS_WIN) && !defined(USE_AURA) | 111 #if defined(USE_AURA) |
| 112 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_aura.h" |
| 113 #elif defined(OS_WIN) |
112 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_win.h" | 114 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_win.h" |
113 #endif | 115 #endif |
114 | 116 |
115 #if defined(TOOLKIT_USES_GTK) | 117 #if defined(TOOLKIT_USES_GTK) |
116 #include "chrome/browser/chrome_browser_main_extra_parts_gtk.h" | 118 #include "chrome/browser/chrome_browser_main_extra_parts_gtk.h" |
117 #endif | 119 #endif |
118 | 120 |
119 #if defined(TOOLKIT_VIEWS) | 121 #if defined(TOOLKIT_VIEWS) |
120 #include "chrome/browser/chrome_browser_main_extra_parts_views.h" | 122 #include "chrome/browser/chrome_browser_main_extra_parts_views.h" |
121 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" | 123 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 main_parts->AddParts(new ChromeBrowserMainExtraPartsAura()); | 355 main_parts->AddParts(new ChromeBrowserMainExtraPartsAura()); |
354 #endif | 356 #endif |
355 | 357 |
356 return main_parts; | 358 return main_parts; |
357 } | 359 } |
358 | 360 |
359 content::WebContentsView* | 361 content::WebContentsView* |
360 ChromeContentBrowserClient::OverrideCreateWebContentsView( | 362 ChromeContentBrowserClient::OverrideCreateWebContentsView( |
361 WebContents* web_contents) { | 363 WebContents* web_contents) { |
362 #if defined(TOOLKIT_VIEWS) | 364 #if defined(TOOLKIT_VIEWS) |
363 return new TabContentsViewViews(web_contents); | 365 return new TabContentsViewViews(web_contents, |
| 366 GetWebContentsViewDelegate(web_contents)); |
364 #endif | 367 #endif |
365 return NULL; | 368 return NULL; |
366 } | 369 } |
367 | 370 |
368 content::WebContentsViewDelegate* | 371 content::WebContentsViewDelegate* |
369 ChromeContentBrowserClient::GetWebContentsViewDelegate( | 372 ChromeContentBrowserClient::GetWebContentsViewDelegate( |
370 content::WebContents* web_contents) { | 373 content::WebContents* web_contents) { |
371 #if defined(OS_WIN) && !defined(USE_AURA) | 374 #if defined(OS_WIN) && !defined(USE_AURA) |
372 return new ChromeWebContentsViewDelegateWin(web_contents); | 375 return new ChromeWebContentsViewDelegateWin(web_contents); |
373 #elif defined(TOOLKIT_GTK) | 376 #elif defined(TOOLKIT_GTK) |
374 return new ChromeWebContentsViewDelegateGtk(web_contents); | 377 return new ChromeWebContentsViewDelegateGtk(web_contents); |
375 #elif defined(OS_MACOSX) | 378 #elif defined(OS_MACOSX) |
376 return | 379 return |
377 chrome_web_contents_view_delegate_mac::CreateWebContentsViewDelegateMac( | 380 chrome_web_contents_view_delegate_mac::CreateWebContentsViewDelegateMac( |
378 web_contents); | 381 web_contents); |
| 382 #elif defined(USE_AURA) |
| 383 return new ChromeWebContentsViewDelegateAura(web_contents); |
379 #else | 384 #else |
380 return NULL; | 385 return NULL; |
381 #endif | 386 #endif |
382 } | 387 } |
383 | 388 |
384 void ChromeContentBrowserClient::RenderViewHostCreated( | 389 void ChromeContentBrowserClient::RenderViewHostCreated( |
385 RenderViewHost* render_view_host) { | 390 RenderViewHost* render_view_host) { |
386 | 391 |
387 SiteInstance* site_instance = render_view_host->GetSiteInstance(); | 392 SiteInstance* site_instance = render_view_host->GetSiteInstance(); |
388 Profile* profile = Profile::FromBrowserContext( | 393 Profile* profile = Profile::FromBrowserContext( |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 #if defined(USE_NSS) | 1632 #if defined(USE_NSS) |
1628 crypto::CryptoModuleBlockingPasswordDelegate* | 1633 crypto::CryptoModuleBlockingPasswordDelegate* |
1629 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 1634 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
1630 const GURL& url) { | 1635 const GURL& url) { |
1631 return browser::NewCryptoModuleBlockingDialogDelegate( | 1636 return browser::NewCryptoModuleBlockingDialogDelegate( |
1632 browser::kCryptoModulePasswordKeygen, url.host()); | 1637 browser::kCryptoModulePasswordKeygen, url.host()); |
1633 } | 1638 } |
1634 #endif | 1639 #endif |
1635 | 1640 |
1636 } // namespace chrome | 1641 } // namespace chrome |
OLD | NEW |