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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_loader_handler.h

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 namespace extensions { 29 namespace extensions {
30 30
31 class Extension; 31 class Extension;
32 32
33 // The handler page for the Extension Commands UI overlay. 33 // The handler page for the Extension Commands UI overlay.
34 class ExtensionLoaderHandler : public content::WebUIMessageHandler, 34 class ExtensionLoaderHandler : public content::WebUIMessageHandler,
35 public ExtensionErrorReporter::Observer, 35 public ExtensionErrorReporter::Observer,
36 public content::WebContentsObserver { 36 public content::WebContentsObserver {
37 public: 37 public:
38 explicit ExtensionLoaderHandler(Profile* profile); 38 explicit ExtensionLoaderHandler(Profile* profile);
39 virtual ~ExtensionLoaderHandler(); 39 ~ExtensionLoaderHandler() override;
40 40
41 // Fetches the localized values for the page and deposits them into |source|. 41 // Fetches the localized values for the page and deposits them into |source|.
42 void GetLocalizedValues(content::WebUIDataSource* source); 42 void GetLocalizedValues(content::WebUIDataSource* source);
43 43
44 // WebUIMessageHandler implementation. 44 // WebUIMessageHandler implementation.
45 virtual void RegisterMessages() override; 45 void RegisterMessages() override;
46 46
47 private: 47 private:
48 class FileHelper; 48 class FileHelper;
49 49
50 // Handle the 'extensionLoaderLoadUnpacked' message. 50 // Handle the 'extensionLoaderLoadUnpacked' message.
51 void HandleLoadUnpacked(const base::ListValue* args); 51 void HandleLoadUnpacked(const base::ListValue* args);
52 52
53 // Handle the 'extensionLoaderRetry' message. 53 // Handle the 'extensionLoaderRetry' message.
54 void HandleRetry(const base::ListValue* args); 54 void HandleRetry(const base::ListValue* args);
55 55
56 // Handle the 'extensionLoaderIgnoreFailure' message. 56 // Handle the 'extensionLoaderIgnoreFailure' message.
57 void HandleIgnoreFailure(const base::ListValue* args); 57 void HandleIgnoreFailure(const base::ListValue* args);
58 58
59 // Handle the 'extensionLoaderDisplayFailures' message. 59 // Handle the 'extensionLoaderDisplayFailures' message.
60 void HandleDisplayFailures(const base::ListValue* args); 60 void HandleDisplayFailures(const base::ListValue* args);
61 61
62 // Try to load an unpacked extension from the given |file_path|. 62 // Try to load an unpacked extension from the given |file_path|.
63 void LoadUnpackedExtensionImpl(const base::FilePath& file_path); 63 void LoadUnpackedExtensionImpl(const base::FilePath& file_path);
64 64
65 // ExtensionErrorReporter::Observer: 65 // ExtensionErrorReporter::Observer:
66 virtual void OnLoadFailure(content::BrowserContext* browser_context, 66 void OnLoadFailure(content::BrowserContext* browser_context,
67 const base::FilePath& file_path, 67 const base::FilePath& file_path,
68 const std::string& error) override; 68 const std::string& error) override;
69 69
70 // content::WebContentsObserver: 70 // content::WebContentsObserver:
71 virtual void DidStartNavigationToPendingEntry( 71 void DidStartNavigationToPendingEntry(
72 const GURL& url, 72 const GURL& url,
73 content::NavigationController::ReloadType reload_type) override; 73 content::NavigationController::ReloadType reload_type) override;
74 74
75 // Add a failure to |failures_|. If it was a manifest error, |manifest| will 75 // Add a failure to |failures_|. If it was a manifest error, |manifest| will
76 // hold the manifest contents, and |line_number| will point to the line at 76 // hold the manifest contents, and |line_number| will point to the line at
77 // which the error was found. 77 // which the error was found.
78 void AddFailure(const base::FilePath& file_path, 78 void AddFailure(const base::FilePath& file_path,
79 const std::string& error, 79 const std::string& error,
80 size_t line_number, 80 size_t line_number,
81 const std::string& manifest); 81 const std::string& manifest);
(...skipping 24 matching lines...) Expand all
106 106
107 // Weak pointer factory for posting background tasks. 107 // Weak pointer factory for posting background tasks.
108 base::WeakPtrFactory<ExtensionLoaderHandler> weak_ptr_factory_; 108 base::WeakPtrFactory<ExtensionLoaderHandler> weak_ptr_factory_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(ExtensionLoaderHandler); 110 DISALLOW_COPY_AND_ASSIGN(ExtensionLoaderHandler);
111 }; 111 };
112 112
113 } // namespace extensions 113 } // namespace extensions
114 114
115 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_ 115 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_LOADER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698