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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 #include "chrome/browser/signin/chrome_signin_client_factory.h" | 179 #include "chrome/browser/signin/chrome_signin_client_factory.h" |
180 #include "chrome/browser/signin/signin_manager_factory.h" | 180 #include "chrome/browser/signin/signin_manager_factory.h" |
181 #include "components/signin/core/browser/signin_manager.h" | 181 #include "components/signin/core/browser/signin_manager.h" |
182 #endif | 182 #endif |
183 | 183 |
184 #if defined(TOOLKIT_VIEWS) | 184 #if defined(TOOLKIT_VIEWS) |
185 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" | 185 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" |
186 #endif | 186 #endif |
187 | 187 |
188 #if defined(USE_ATHENA) | 188 #if defined(USE_ATHENA) |
| 189 #include "athena/content/public/web_contents_view_delegate_creator.h" |
189 #include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.
h" | 190 #include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.
h" |
190 #elif defined(USE_ASH) | 191 #elif defined(USE_ASH) |
191 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" | 192 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" |
192 #endif | 193 #endif |
193 | 194 |
194 #if defined(USE_AURA) | 195 #if defined(USE_AURA) |
195 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" | 196 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" |
196 #endif | 197 #endif |
197 | 198 |
198 #if defined(USE_X11) | 199 #if defined(USE_X11) |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // Assert that if |can_be_default| is false, the code above must have found a | 782 // Assert that if |can_be_default| is false, the code above must have found a |
782 // non-default partition. If this fails, the caller has a serious logic | 783 // non-default partition. If this fails, the caller has a serious logic |
783 // error about which StoragePartition they expect to be in and it is not | 784 // error about which StoragePartition they expect to be in and it is not |
784 // safe to continue. | 785 // safe to continue. |
785 CHECK(can_be_default || !partition_domain->empty()); | 786 CHECK(can_be_default || !partition_domain->empty()); |
786 } | 787 } |
787 | 788 |
788 content::WebContentsViewDelegate* | 789 content::WebContentsViewDelegate* |
789 ChromeContentBrowserClient::GetWebContentsViewDelegate( | 790 ChromeContentBrowserClient::GetWebContentsViewDelegate( |
790 content::WebContents* web_contents) { | 791 content::WebContents* web_contents) { |
| 792 #if defined(USE_ATHENA) |
| 793 return athena::CreateWebContentsViewDelegate(web_contents); |
| 794 #else |
791 return chrome::CreateWebContentsViewDelegate(web_contents); | 795 return chrome::CreateWebContentsViewDelegate(web_contents); |
| 796 #endif |
792 } | 797 } |
793 | 798 |
794 void ChromeContentBrowserClient::RenderProcessWillLaunch( | 799 void ChromeContentBrowserClient::RenderProcessWillLaunch( |
795 content::RenderProcessHost* host) { | 800 content::RenderProcessHost* host) { |
796 int id = host->GetID(); | 801 int id = host->GetID(); |
797 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 802 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
798 net::URLRequestContextGetter* context = | 803 net::URLRequestContextGetter* context = |
799 profile->GetRequestContextForRenderProcess(id); | 804 profile->GetRequestContextForRenderProcess(id); |
800 | 805 |
801 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); | 806 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); |
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 switches::kDisableWebRtcEncryption, | 2598 switches::kDisableWebRtcEncryption, |
2594 }; | 2599 }; |
2595 to_command_line->CopySwitchesFrom(from_command_line, | 2600 to_command_line->CopySwitchesFrom(from_command_line, |
2596 kWebRtcDevSwitchNames, | 2601 kWebRtcDevSwitchNames, |
2597 arraysize(kWebRtcDevSwitchNames)); | 2602 arraysize(kWebRtcDevSwitchNames)); |
2598 } | 2603 } |
2599 } | 2604 } |
2600 #endif // defined(ENABLE_WEBRTC) | 2605 #endif // defined(ENABLE_WEBRTC) |
2601 | 2606 |
2602 } // namespace chrome | 2607 } // namespace chrome |
OLD | NEW |