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

Side by Side Diff: chrome/browser/extensions/api/extension_action/extension_action_api.h

Issue 14699002: Move BrowserAction references from ExtensionPrefs to ExtensionActionAPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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 (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_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
11 #include "chrome/browser/extensions/extension_function.h" 11 #include "chrome/browser/extensions/extension_function.h"
12 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
14 14
15 namespace base { 15 namespace base {
16 class DictionaryValue; 16 class DictionaryValue;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 class WebContents; 20 class WebContents;
21 } 21 }
22 22
23 namespace extensions { 23 namespace extensions {
24 class ExtensionPrefs;
24 class TabHelper; 25 class TabHelper;
25 26
26 class ExtensionActionAPI : public ProfileKeyedAPI { 27 class ExtensionActionAPI : public ProfileKeyedAPI {
27 public: 28 public:
28 explicit ExtensionActionAPI(Profile* profile); 29 explicit ExtensionActionAPI(Profile* profile);
29 virtual ~ExtensionActionAPI(); 30 virtual ~ExtensionActionAPI();
30 31
32 static bool GetBrowserActionVisibility(const ExtensionPrefs* prefs,
33 const std::string& extension_id);
34 static void SetBrowserActionVisibility(ExtensionPrefs* prefs,
35 const std::string& extension_id,
36 bool visible);
37
31 // ProfileKeyedAPI implementation. 38 // ProfileKeyedAPI implementation.
32 static ProfileKeyedAPIFactory<ExtensionActionAPI>* GetFactoryInstance(); 39 static ProfileKeyedAPIFactory<ExtensionActionAPI>* GetFactoryInstance();
33 40
34 private: 41 private:
35 friend class ProfileKeyedAPIFactory<ExtensionActionAPI>; 42 friend class ProfileKeyedAPIFactory<ExtensionActionAPI>;
36 43
37 // ProfileKeyedAPI implementation. 44 // ProfileKeyedAPI implementation.
38 static const char* service_name() { return "ExtensionActionAPI"; } 45 static const char* service_name() { return "ExtensionActionAPI"; }
39 46
40 DISALLOW_COPY_AND_ASSIGN(ExtensionActionAPI); 47 DISALLOW_COPY_AND_ASSIGN(ExtensionActionAPI);
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 PAGEACTIONS_DISABLEFORTAB) 426 PAGEACTIONS_DISABLEFORTAB)
420 427
421 protected: 428 protected:
422 virtual ~DisablePageActionsFunction() {} 429 virtual ~DisablePageActionsFunction() {}
423 430
424 // ExtensionFunction: 431 // ExtensionFunction:
425 virtual bool RunImpl() OVERRIDE; 432 virtual bool RunImpl() OVERRIDE;
426 }; 433 };
427 434
428 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H _ 435 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698