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

Side by Side Diff: chrome/browser/extensions/api/runtime/runtime_api.h

Issue 16844020: app_mode: Add runtime.onRestartRequired event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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) 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_RUNTIME_RUNTIME_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_
7 7
8 #include <string>
9
8 #include "chrome/browser/extensions/extension_function.h" 10 #include "chrome/browser/extensions/extension_function.h"
11 #include "chrome/common/extensions/api/runtime.h"
9 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
11 14
12 class Profile; 15 class Profile;
13 16
14 namespace base { 17 namespace base {
15 class Version; 18 class Version;
16 } 19 }
17 20
18 namespace extensions { 21 namespace extensions {
(...skipping 14 matching lines...) Expand all
33 36
34 // Dispatches the onUpdateAvailable event to the given extension. 37 // Dispatches the onUpdateAvailable event to the given extension.
35 static void DispatchOnUpdateAvailableEvent( 38 static void DispatchOnUpdateAvailableEvent(
36 Profile* profile, 39 Profile* profile,
37 const std::string& extension_id, 40 const std::string& extension_id,
38 const base::DictionaryValue* manifest); 41 const base::DictionaryValue* manifest);
39 42
40 // Dispatches the onBrowserUpdateAvailable event to all extensions. 43 // Dispatches the onBrowserUpdateAvailable event to all extensions.
41 static void DispatchOnBrowserUpdateAvailableEvent(Profile* profile); 44 static void DispatchOnBrowserUpdateAvailableEvent(Profile* profile);
42 45
46 // Dispatches the onRestartRequired event to the given app.
47 static void DispatchOnRestartRequiredEvent(
48 Profile* profile,
49 const std::string& app_id,
50 api::runtime::OnRestartRequired::Reason reason);
51
43 // Does any work needed at extension uninstall (e.g. load uninstall url). 52 // Does any work needed at extension uninstall (e.g. load uninstall url).
44 static void OnExtensionUninstalled(Profile* profile, 53 static void OnExtensionUninstalled(Profile* profile,
45 const std::string& extension_id); 54 const std::string& extension_id);
46 }; 55 };
47 56
48 class RuntimeGetBackgroundPageFunction : public AsyncExtensionFunction { 57 class RuntimeGetBackgroundPageFunction : public AsyncExtensionFunction {
49 public: 58 public:
50 DECLARE_EXTENSION_FUNCTION("runtime.getBackgroundPage", 59 DECLARE_EXTENSION_FUNCTION("runtime.getBackgroundPage",
51 RUNTIME_GETBACKGROUNDPAGE) 60 RUNTIME_GETBACKGROUNDPAGE)
52 61
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 RUNTIME_GETPACKAGEDIRECTORYENTRY) 124 RUNTIME_GETPACKAGEDIRECTORYENTRY)
116 125
117 protected: 126 protected:
118 virtual ~RuntimeGetPackageDirectoryEntryFunction() {} 127 virtual ~RuntimeGetPackageDirectoryEntryFunction() {}
119 virtual bool RunImpl() OVERRIDE; 128 virtual bool RunImpl() OVERRIDE;
120 }; 129 };
121 130
122 } // namespace extensions 131 } // namespace extensions
123 132
124 #endif // CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ 133 #endif // CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/activity_log/api_name_constants.h ('k') | chrome/browser/extensions/api/runtime/runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698