Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/extensions/component_migration_helper.h

Issue 1612203002: [Media Router] Adds a contextual menu item to remove the MR component action. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to pkasting@ comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMPONENT_MIGRATION_HELPER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_COMPONENT_MIGRATION_HELPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_MIGRATION_HELPER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_COMPONENT_MIGRATION_HELPER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Call when we should potentially add the component action and unload 94 // Call when we should potentially add the component action and unload
95 // the extension. PREREQUISITE: The extension action redesign MUST be 95 // the extension. PREREQUISITE: The extension action redesign MUST be
96 // enabled. 96 // enabled.
97 void OnFeatureEnabled(const std::string& component_action_id); 97 void OnFeatureEnabled(const std::string& component_action_id);
98 98
99 // Call when we should potentially remove the component action and re-enable 99 // Call when we should potentially remove the component action and re-enable
100 // extension loading. 100 // extension loading.
101 void OnFeatureDisabled(const std::string& component_action_id); 101 void OnFeatureDisabled(const std::string& component_action_id);
102 102
103 // Call when the user manually removes the component action from the toolbar.
104 void OnActionRemoved(const std::string& component_action_id);
105
103 // extensions::ExtensionRegistryObserver: 106 // extensions::ExtensionRegistryObserver:
104 void OnExtensionReady(content::BrowserContext* browser_context, 107 void OnExtensionReady(content::BrowserContext* browser_context,
105 const Extension* extension) override; 108 const Extension* extension) override;
106 109
107 protected: 110 protected:
108 // Protected for unit testing. 111 // Protected for unit testing.
109 void SetComponentActionPref(const std::string& component_action_id, 112 void SetComponentActionPref(const std::string& component_action_id,
110 bool enabled); 113 bool enabled);
111 114
112 // A set of component action ids whose features are currently enabled. 115 // A set of component action ids whose features are currently enabled.
(...skipping 21 matching lines...) Expand all
134 137
135 // A list of pairs of component action ids and extension ids. 138 // A list of pairs of component action ids and extension ids.
136 std::vector<std::pair<std::string, ExtensionId>> migrated_actions_; 139 std::vector<std::pair<std::string, ExtensionId>> migrated_actions_;
137 140
138 DISALLOW_COPY_AND_ASSIGN(ComponentMigrationHelper); 141 DISALLOW_COPY_AND_ASSIGN(ComponentMigrationHelper);
139 }; 142 };
140 143
141 } // namespace extensions 144 } // namespace extensions
142 145
143 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_MIGRATION_HELPER_H_ 146 #endif // CHROME_BROWSER_EXTENSIONS_COMPONENT_MIGRATION_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/extensions/component_migration_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698