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

Side by Side Diff: extensions/browser/runtime_api_delegate.h

Issue 264743014: Move chrome.runtime to //extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_BROWSER_RUNTIME_API_DELEGATE_H
6 #define EXTENSIONS_BROWSER_RUNTIME_API_DELEGATE_H
7
8 #include "base/callback.h"
9 #include "base/version.h"
10 #include "extensions/browser/api/runtime/runtime_api.h"
not at google - send to devlin 2014/05/05 19:26:15 odd having a circular dependency like this, even i
11 #include "extensions/common/api/runtime.h"
12
13 class GURL;
14
15 namespace extensions {
16
17 class Extension;
18 class UpdateObserver;
19
not at google - send to devlin 2014/05/05 19:26:15 comment
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Done.
20 class RuntimeAPIDelegate {
21 public:
22 // Registers an UpdateObserver on behalf of the runtime API.
23 virtual void RegisterUpdateObserver(UpdateObserver* observer) = 0;
not at google - send to devlin 2014/05/05 19:26:15 you're right -- it's odd that you need to do this,
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 It's a good rant :) I think I'd like to defer on
24
25 // Unregisters an UpdateObserver on behalf of the runtime API.
26 virtual void UnregisterUpdateObserver(UpdateObserver* observer) = 0;
27
28 // Determines an extension's previously installed version if applicable.
29 virtual base::Version GetOldExtensionVersion(const Extension* extension) = 0;
not at google - send to devlin 2014/05/05 19:26:15 the comment uses "previously" which is a better na
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Done.
30
31 // Reloads an extension if possible.
32 virtual void MaybeReloadExtension(const std::string& extension_id) = 0;
not at google - send to devlin 2014/05/05 19:26:15 What does it mean "if possible"? why "maybe"? It's
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Yeah, I realized that after I uploaded too... Done
33
34 // Requests an extensions update update check. Returns |false| if updates
35 // are disabled. Otherwise |callback| is called with the result of the
36 // update check.
37 virtual bool RequestUpdateCheck(
not at google - send to devlin 2014/05/05 19:26:15 "request" is implicit because you're calling it. "
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Done.
38 const std::string& extension_id,
39 const RuntimeAPI::UpdateCheckCallback& callback) = 0;
not at google - send to devlin 2014/05/05 19:26:15 seems like UpdateCheckCallback (and its struct) sh
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Yeah that's where they started. I have no idea why
40
41 // Handles uninstallation if the uninstalled extension provides an uninstall
42 // URL.
43 virtual void HandleUninstall(const std::string& extension_id,
not at google - send to devlin 2014/05/05 19:26:15 "Handle uninstall" is an odd way to phrase this. i
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Renamed to OpenURL as discussed.
44 const GURL& uninstall_url) = 0;
45
46 // Populates platform info to be provided by the getPlatformInfo function.
47 // Returns false iff no info is provided.
48 virtual bool GetPlatformInfo(
49 core_api::runtime::GetPlatformInfo::Results::PlatformInfo* info) = 0;
50
51 // Request a restart of the host device.
52 virtual bool RequestRestart(std::string* error_message) = 0;
not at google - send to devlin 2014/05/05 19:26:15 what does the return value mean? also: RestartDev
Ken Rockot(use gerrit already) 2014/05/05 21:08:07 Done.
53 };
54
55 } // namespace extensions
56
57 #endif // EXTENSIONS_BROWSER_RUNTIME_API_DELEGATE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698