| 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 ExtensionService* service = | 831 ExtensionService* service = |
| 832 extensions::ExtensionSystem::Get(profile)->extension_service(); | 832 extensions::ExtensionSystem::Get(profile)->extension_service(); |
| 833 if (!service) { | 833 if (!service) { |
| 834 NOTREACHED(); | 834 NOTREACHED(); |
| 835 return; | 835 return; |
| 836 } | 836 } |
| 837 | 837 |
| 838 /// TODO(fsamuel): In the future, certain types of GuestViews won't require | 838 /// TODO(fsamuel): In the future, certain types of GuestViews won't require |
| 839 // extension bindings. At that point, we should clear |extension_id| instead | 839 // extension bindings. At that point, we should clear |extension_id| instead |
| 840 // of exiting early. | 840 // of exiting early. |
| 841 if (!service->GetExtensionById(extension_id, false) && | 841 if (!extension_id.empty() && |
| 842 !service->GetExtensionById(extension_id, false) && |
| 842 !CommandLine::ForCurrentProcess()->HasSwitch( | 843 !CommandLine::ForCurrentProcess()->HasSwitch( |
| 843 switches::kEnableBrowserPluginForAllViewTypes)) { | 844 switches::kEnableBrowserPluginForAllViewTypes)) { |
| 844 NOTREACHED(); | 845 NOTREACHED(); |
| 845 return; | 846 return; |
| 846 } | 847 } |
| 847 | 848 |
| 848 if (opener_web_contents) { | 849 if (opener_web_contents) { |
| 849 GuestView* guest = GuestView::FromWebContents(opener_web_contents); | 850 GuestView* guest = GuestView::FromWebContents(opener_web_contents); |
| 850 if (!guest) { | 851 if (!guest) { |
| 851 NOTREACHED(); | 852 NOTREACHED(); |
| (...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2726 switches::kDisableWebRtcEncryption, | 2727 switches::kDisableWebRtcEncryption, |
| 2727 }; | 2728 }; |
| 2728 to_command_line->CopySwitchesFrom(from_command_line, | 2729 to_command_line->CopySwitchesFrom(from_command_line, |
| 2729 kWebRtcDevSwitchNames, | 2730 kWebRtcDevSwitchNames, |
| 2730 arraysize(kWebRtcDevSwitchNames)); | 2731 arraysize(kWebRtcDevSwitchNames)); |
| 2731 } | 2732 } |
| 2732 } | 2733 } |
| 2733 #endif // defined(ENABLE_WEBRTC) | 2734 #endif // defined(ENABLE_WEBRTC) |
| 2734 | 2735 |
| 2735 } // namespace chrome | 2736 } // namespace chrome |
| OLD | NEW |