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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 #include "chrome/browser/signin/chrome_signin_client.h" | 188 #include "chrome/browser/signin/chrome_signin_client.h" |
189 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 189 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
190 #include "chrome/browser/signin/signin_manager_factory.h" | 190 #include "chrome/browser/signin/signin_manager_factory.h" |
191 #include "components/signin/core/browser/signin_manager.h" | 191 #include "components/signin/core/browser/signin_manager.h" |
192 #endif | 192 #endif |
193 | 193 |
194 #if defined(TOOLKIT_VIEWS) | 194 #if defined(TOOLKIT_VIEWS) |
195 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" | 195 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" |
196 #endif | 196 #endif |
197 | 197 |
198 #if defined(USE_ATHENA) | 198 #if defined(USE_ASH) |
199 #include "athena/content/public/web_contents_view_delegate_creator.h" | |
200 #include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.
h" | |
201 #elif defined(USE_ASH) | |
202 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" | 199 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" |
203 #endif | 200 #endif |
204 | 201 |
205 #if defined(USE_AURA) | 202 #if defined(USE_AURA) |
206 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" | 203 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" |
207 #endif | 204 #endif |
208 | 205 |
209 #if defined(USE_X11) | 206 #if defined(USE_X11) |
210 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" | 207 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" |
211 #endif | 208 #endif |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 chrome::AddProfilesExtraParts(main_parts); | 712 chrome::AddProfilesExtraParts(main_parts); |
716 | 713 |
717 // Construct additional browser parts. Stages are called in the order in | 714 // Construct additional browser parts. Stages are called in the order in |
718 // which they are added. | 715 // which they are added. |
719 #if defined(TOOLKIT_VIEWS) | 716 #if defined(TOOLKIT_VIEWS) |
720 main_parts->AddParts(new ChromeBrowserMainExtraPartsViews()); | 717 main_parts->AddParts(new ChromeBrowserMainExtraPartsViews()); |
721 #endif | 718 #endif |
722 | 719 |
723 // TODO(oshima): Athena on chrome currently requires USE_ASH to build. | 720 // TODO(oshima): Athena on chrome currently requires USE_ASH to build. |
724 // We should reduce the dependency as much as possible. | 721 // We should reduce the dependency as much as possible. |
725 #if defined(USE_ATHENA) | 722 #if defined(USE_ASH) |
726 main_parts->AddParts(CreateChromeBrowserMainExtraPartsAthena()); | |
727 #elif defined(USE_ASH) | |
728 main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh()); | 723 main_parts->AddParts(new ChromeBrowserMainExtraPartsAsh()); |
729 #endif | 724 #endif |
730 | 725 |
731 #if defined(USE_AURA) | 726 #if defined(USE_AURA) |
732 main_parts->AddParts(new ChromeBrowserMainExtraPartsAura()); | 727 main_parts->AddParts(new ChromeBrowserMainExtraPartsAura()); |
733 #endif | 728 #endif |
734 | 729 |
735 #if defined(USE_X11) | 730 #if defined(USE_X11) |
736 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); | 731 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); |
737 #endif | 732 #endif |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 // Assert that if |can_be_default| is false, the code above must have found a | 820 // Assert that if |can_be_default| is false, the code above must have found a |
826 // non-default partition. If this fails, the caller has a serious logic | 821 // non-default partition. If this fails, the caller has a serious logic |
827 // error about which StoragePartition they expect to be in and it is not | 822 // error about which StoragePartition they expect to be in and it is not |
828 // safe to continue. | 823 // safe to continue. |
829 CHECK(can_be_default || !partition_domain->empty()); | 824 CHECK(can_be_default || !partition_domain->empty()); |
830 } | 825 } |
831 | 826 |
832 content::WebContentsViewDelegate* | 827 content::WebContentsViewDelegate* |
833 ChromeContentBrowserClient::GetWebContentsViewDelegate( | 828 ChromeContentBrowserClient::GetWebContentsViewDelegate( |
834 content::WebContents* web_contents) { | 829 content::WebContents* web_contents) { |
835 #if defined(USE_ATHENA) | |
836 return athena::CreateWebContentsViewDelegate(web_contents); | |
837 #else | |
838 return chrome::CreateWebContentsViewDelegate(web_contents); | 830 return chrome::CreateWebContentsViewDelegate(web_contents); |
839 #endif | |
840 } | 831 } |
841 | 832 |
842 void ChromeContentBrowserClient::RenderProcessWillLaunch( | 833 void ChromeContentBrowserClient::RenderProcessWillLaunch( |
843 content::RenderProcessHost* host) { | 834 content::RenderProcessHost* host) { |
844 int id = host->GetID(); | 835 int id = host->GetID(); |
845 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 836 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
846 net::URLRequestContextGetter* context = | 837 net::URLRequestContextGetter* context = |
847 profile->GetRequestContextForRenderProcess(id); | 838 profile->GetRequestContextForRenderProcess(id); |
848 | 839 |
849 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); | 840 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); |
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2628 switches::kDisableWebRtcEncryption, | 2619 switches::kDisableWebRtcEncryption, |
2629 }; | 2620 }; |
2630 to_command_line->CopySwitchesFrom(from_command_line, | 2621 to_command_line->CopySwitchesFrom(from_command_line, |
2631 kWebRtcDevSwitchNames, | 2622 kWebRtcDevSwitchNames, |
2632 arraysize(kWebRtcDevSwitchNames)); | 2623 arraysize(kWebRtcDevSwitchNames)); |
2633 } | 2624 } |
2634 } | 2625 } |
2635 #endif // defined(ENABLE_WEBRTC) | 2626 #endif // defined(ENABLE_WEBRTC) |
2636 | 2627 |
2637 } // namespace chrome | 2628 } // namespace chrome |
OLD | NEW |