| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 class ExtensionsUIHTMLSource : public ChromeURLDataManager::DataSource { | 45 class ExtensionsUIHTMLSource : public ChromeURLDataManager::DataSource { |
| 46 public: | 46 public: |
| 47 ExtensionsUIHTMLSource(); | 47 ExtensionsUIHTMLSource(); |
| 48 | 48 |
| 49 // Called when the network layer has requested a resource underneath | 49 // Called when the network layer has requested a resource underneath |
| 50 // the path we registered. | 50 // the path we registered. |
| 51 virtual void StartDataRequest(const std::string& path, | 51 virtual void StartDataRequest(const std::string& path, |
| 52 bool is_off_the_record, | 52 bool is_off_the_record, |
| 53 int request_id); | 53 int request_id); |
| 54 virtual std::string GetMimeType(const std::string&) const { | 54 virtual std::string GetMimeType(const std::string&) const; |
| 55 return "text/html"; | |
| 56 } | |
| 57 | 55 |
| 58 private: | 56 private: |
| 59 ~ExtensionsUIHTMLSource() {} | 57 ~ExtensionsUIHTMLSource() {} |
| 60 | 58 |
| 61 DISALLOW_COPY_AND_ASSIGN(ExtensionsUIHTMLSource); | 59 DISALLOW_COPY_AND_ASSIGN(ExtensionsUIHTMLSource); |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 // The handler for JavaScript messages related to the "extensions" view. | 62 // The handler for JavaScript messages related to the "extensions" view. |
| 65 class ExtensionsDOMHandler | 63 class ExtensionsDOMHandler |
| 66 : public DOMMessageHandler, | 64 : public DOMMessageHandler, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // Utility for callbacks that get an extension ID as the sole argument. | 181 // Utility for callbacks that get an extension ID as the sole argument. |
| 184 const Extension* GetExtension(const ListValue* args); | 182 const Extension* GetExtension(const ListValue* args); |
| 185 | 183 |
| 186 // Forces a UI update if appropriate after a notification is received. | 184 // Forces a UI update if appropriate after a notification is received. |
| 187 void MaybeUpdateAfterNotification(); | 185 void MaybeUpdateAfterNotification(); |
| 188 | 186 |
| 189 // SelectFileDialog::Listener | 187 // SelectFileDialog::Listener |
| 190 virtual void FileSelected(const FilePath& path, | 188 virtual void FileSelected(const FilePath& path, |
| 191 int index, void* params); | 189 int index, void* params); |
| 192 virtual void MultiFilesSelected( | 190 virtual void MultiFilesSelected( |
| 193 const std::vector<FilePath>& files, void* params) { | 191 const std::vector<FilePath>& files, void* params); |
| 194 NOTREACHED(); | |
| 195 } | |
| 196 virtual void FileSelectionCanceled(void* params) {} | 192 virtual void FileSelectionCanceled(void* params) {} |
| 197 | 193 |
| 198 // NotificationObserver | 194 // NotificationObserver |
| 199 virtual void Observe(NotificationType type, | 195 virtual void Observe(NotificationType type, |
| 200 const NotificationSource& source, | 196 const NotificationSource& source, |
| 201 const NotificationDetails& details); | 197 const NotificationDetails& details); |
| 202 | 198 |
| 203 // Helper that lists the current active html pages for an extension. | 199 // Helper that lists the current active html pages for an extension. |
| 204 std::vector<ExtensionPage> GetActivePagesForExtension( | 200 std::vector<ExtensionPage> GetActivePagesForExtension( |
| 205 const Extension* extension); | 201 const Extension* extension); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 266 |
| 271 static RefCountedMemory* GetFaviconResourceBytes(); | 267 static RefCountedMemory* GetFaviconResourceBytes(); |
| 272 | 268 |
| 273 static void RegisterUserPrefs(PrefService* prefs); | 269 static void RegisterUserPrefs(PrefService* prefs); |
| 274 | 270 |
| 275 private: | 271 private: |
| 276 DISALLOW_COPY_AND_ASSIGN(ExtensionsUI); | 272 DISALLOW_COPY_AND_ASSIGN(ExtensionsUI); |
| 277 }; | 273 }; |
| 278 | 274 |
| 279 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_ | 275 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_UI_H_ |
| OLD | NEW |