OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/renderer/dispatcher.h" | 5 #include "extensions/renderer/dispatcher.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 if (api_feature_provider->GetParent(map_entry.second.get()) != nullptr) | 1399 if (api_feature_provider->GetParent(map_entry.second.get()) != nullptr) |
1400 continue; | 1400 continue; |
1401 | 1401 |
1402 // Skip chrome.test if this isn't a test. | 1402 // Skip chrome.test if this isn't a test. |
1403 if (map_entry.first == "test" && | 1403 if (map_entry.first == "test" && |
1404 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1404 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
1405 ::switches::kTestType)) { | 1405 ::switches::kTestType)) { |
1406 continue; | 1406 continue; |
1407 } | 1407 } |
1408 | 1408 |
1409 if (context->IsAnyFeatureAvailableToContext(*map_entry.second.get())) { | 1409 if (context->IsAnyFeatureAvailableToContext(*map_entry.second)) { |
1410 // TODO(lazyboy): RegisterBinding() uses |source_map_|, any thread | 1410 // TODO(lazyboy): RegisterBinding() uses |source_map_|, any thread |
1411 // safety issue? | 1411 // safety issue? |
1412 RegisterBinding(map_entry.first, context); | 1412 RegisterBinding(map_entry.first, context); |
1413 } | 1413 } |
1414 } | 1414 } |
1415 break; | 1415 break; |
1416 } | 1416 } |
1417 } | 1417 } |
1418 } | 1418 } |
1419 | 1419 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 // The "guestViewDeny" module must always be loaded last. It registers | 1660 // The "guestViewDeny" module must always be loaded last. It registers |
1661 // error-providing custom elements for the GuestView types that are not | 1661 // error-providing custom elements for the GuestView types that are not |
1662 // available, and thus all of those types must have been checked and loaded | 1662 // available, and thus all of those types must have been checked and loaded |
1663 // (or not loaded) beforehand. | 1663 // (or not loaded) beforehand. |
1664 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 1664 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
1665 module_system->Require("guestViewDeny"); | 1665 module_system->Require("guestViewDeny"); |
1666 } | 1666 } |
1667 } | 1667 } |
1668 | 1668 |
1669 } // namespace extensions | 1669 } // namespace extensions |
OLD | NEW |