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

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

Issue 159323: Make possible restarting extensions from the chrome://extensions/ page.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_EXTENSIONS_UI_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 private: 44 private:
45 DISALLOW_COPY_AND_ASSIGN(ExtensionsUIHTMLSource); 45 DISALLOW_COPY_AND_ASSIGN(ExtensionsUIHTMLSource);
46 }; 46 };
47 47
48 // The handler for Javascript messages related to the "extensions" view. 48 // The handler for Javascript messages related to the "extensions" view.
49 class ExtensionsDOMHandler : public DOMMessageHandler { 49 class ExtensionsDOMHandler : public DOMMessageHandler {
50 public: 50 public:
51 explicit ExtensionsDOMHandler(ExtensionsService* extension_service); 51 explicit ExtensionsDOMHandler(ExtensionsService* extension_service);
52 virtual ~ExtensionsDOMHandler(); 52 virtual ~ExtensionsDOMHandler();
53 53
54 // DOMMessageHandler implementation. 54 // DOMMessageHandler implementation.
55 virtual void RegisterMessages(); 55 virtual void RegisterMessages();
56 56
57 // Extension Detail JSON Struct for page. (static for ease of testing). 57 // Extension Detail JSON Struct for page. (static for ease of testing).
58 static DictionaryValue* CreateExtensionDetailValue( 58 static DictionaryValue* CreateExtensionDetailValue(
59 const Extension *extension, 59 const Extension *extension,
60 const std::vector<ExtensionPage>&); 60 const std::vector<ExtensionPage>&);
61 61
62 // ContentScript JSON Struct for page. (static for ease of testing). 62 // ContentScript JSON Struct for page. (static for ease of testing).
63 static DictionaryValue* CreateContentScriptDetailValue( 63 static DictionaryValue* CreateContentScriptDetailValue(
64 const UserScript& script, 64 const UserScript& script,
65 const FilePath& extension_path); 65 const FilePath& extension_path);
66 66
67 private: 67 private:
68 // Callback for "requestExtensionsData" message. 68 // Callback for "requestExtensionsData" message.
69 void HandleRequestExtensionsData(const Value* value); 69 void HandleRequestExtensionsData(const Value* value);
70 70
71 // Callback for "inspect" message. 71 // Callback for "inspect" message.
72 void HandleInspectMessage(const Value* value); 72 void HandleInspectMessage(const Value* value);
73 73
74 // Callback for "reload" message.
75 void HandleReloadMessage(const Value* value);
76
74 // Callback for "uninstall" message. 77 // Callback for "uninstall" message.
75 void HandleUninstallMessage(const Value* value); 78 void HandleUninstallMessage(const Value* value);
76 79
77 // Helper that lists the current active html pages for an extension. 80 // Helper that lists the current active html pages for an extension.
78 std::vector<ExtensionPage> GetActivePagesForExtension( 81 std::vector<ExtensionPage> GetActivePagesForExtension(
79 const std::string& extension_id); 82 const std::string& extension_id);
80 83
81 // Our model. 84 // Our model.
82 scoped_refptr<ExtensionsService> extensions_service_; 85 scoped_refptr<ExtensionsService> extensions_service_;
83 86
84 DISALLOW_COPY_AND_ASSIGN(ExtensionsDOMHandler); 87 DISALLOW_COPY_AND_ASSIGN(ExtensionsDOMHandler);
85 }; 88 };
86 89
87 class ExtensionsUI : public DOMUI { 90 class ExtensionsUI : public DOMUI {
88 public: 91 public:
89 explicit ExtensionsUI(TabContents* contents); 92 explicit ExtensionsUI(TabContents* contents);
90 93
91 private: 94 private:
92 DISALLOW_COPY_AND_ASSIGN(ExtensionsUI); 95 DISALLOW_COPY_AND_ASSIGN(ExtensionsUI);
93 }; 96 };
94 97
95 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_ 98 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698