| 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 #ifndef CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/linked_ptr.h" | |
| 13 #include "base/scoped_observer.h" | 13 #include "base/scoped_observer.h" |
| 14 #include "extensions/browser/extension_registry_observer.h" | 14 #include "extensions/browser/extension_registry_observer.h" |
| 15 | 15 |
| 16 class ExtensionAction; | 16 class ExtensionAction; |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class WebContents; | 19 class WebContents; |
| 20 class BrowserContext; | 20 class BrowserContext; |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 | 51 |
| 52 // The ExtensionActionManager to provide page actions. | 52 // The ExtensionActionManager to provide page actions. |
| 53 ExtensionActionManager* action_manager_; | 53 ExtensionActionManager* action_manager_; |
| 54 | 54 |
| 55 // Whether or not to show page actions in the location bar at all. (This is | 55 // Whether or not to show page actions in the location bar at all. (This is |
| 56 // false with the toolbar redesign enabled.) | 56 // false with the toolbar redesign enabled.) |
| 57 bool should_show_page_actions_; | 57 bool should_show_page_actions_; |
| 58 | 58 |
| 59 // Manufactured page actions that have been generated for extensions that want | 59 // Manufactured page actions that have been generated for extensions that want |
| 60 // to run a script, but were blocked. | 60 // to run a script, but were blocked. |
| 61 typedef std::map<std::string, linked_ptr<ExtensionAction> > | 61 using ExtensionActionMap = |
| 62 ExtensionActionMap; | 62 std::map<std::string, std::unique_ptr<ExtensionAction>>; |
| 63 ExtensionActionMap active_script_actions_; | 63 ExtensionActionMap active_script_actions_; |
| 64 | 64 |
| 65 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 65 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 66 extension_registry_observer_; | 66 extension_registry_observer_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(LocationBarController); | 68 DISALLOW_COPY_AND_ASSIGN(LocationBarController); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace extensions | 71 } // namespace extensions |
| 72 | 72 |
| 73 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ | 73 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ |
| OLD | NEW |