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

Side by Side Diff: chrome/renderer/extensions/webstore_bindings.h

Issue 630603003: Replacing the OVERRIDE with override in chrome/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch 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
« no previous file with comments | « chrome/renderer/extensions/tab_finder.h ('k') | chrome/renderer/external_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_
6 #define CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_ 6 #define CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/common/extensions/webstore_install_result.h" 9 #include "chrome/common/extensions/webstore_install_result.h"
10 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h" 10 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h"
11 #include "extensions/renderer/object_backed_native_handler.h" 11 #include "extensions/renderer/object_backed_native_handler.h"
12 #include "third_party/WebKit/public/web/WebFrame.h" 12 #include "third_party/WebKit/public/web/WebFrame.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 // A V8 extension that creates an object at window.chrome.webstore. This object 16 // A V8 extension that creates an object at window.chrome.webstore. This object
17 // allows JavaScript to initiate inline installs of apps that are listed in the 17 // allows JavaScript to initiate inline installs of apps that are listed in the
18 // Chrome Web Store (CWS). 18 // Chrome Web Store (CWS).
19 class WebstoreBindings : public ObjectBackedNativeHandler, 19 class WebstoreBindings : public ObjectBackedNativeHandler,
20 public ChromeV8ExtensionHandler { 20 public ChromeV8ExtensionHandler {
21 public: 21 public:
22 explicit WebstoreBindings(ScriptContext* context); 22 explicit WebstoreBindings(ScriptContext* context);
23 23
24 // IPC::Listener 24 // IPC::Listener
25 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 25 virtual bool OnMessageReceived(const IPC::Message& message) override;
26 26
27 private: 27 private:
28 void Install(const v8::FunctionCallbackInfo<v8::Value>& args); 28 void Install(const v8::FunctionCallbackInfo<v8::Value>& args);
29 29
30 void OnInlineWebstoreInstallResponse(int install_id, 30 void OnInlineWebstoreInstallResponse(int install_id,
31 bool success, 31 bool success,
32 const std::string& error, 32 const std::string& error,
33 webstore_install::Result result); 33 webstore_install::Result result);
34 34
35 void OnInlineInstallStageChanged(int stage); 35 void OnInlineInstallStageChanged(int stage);
36 36
37 void OnInlineInstallDownloadProgress(int percent_downloaded); 37 void OnInlineInstallDownloadProgress(int percent_downloaded);
38 38
39 // Extracts a Web Store item ID from a <link rel="chrome-webstore-item" 39 // Extracts a Web Store item ID from a <link rel="chrome-webstore-item"
40 // href="https://chrome.google.com/webstore/detail/id"> node found in the 40 // href="https://chrome.google.com/webstore/detail/id"> node found in the
41 // frame. On success, true will be returned and the |webstore_item_id| 41 // frame. On success, true will be returned and the |webstore_item_id|
42 // parameter will be populated with the ID. On failure, false will be returned 42 // parameter will be populated with the ID. On failure, false will be returned
43 // and |error| will be populated with the error. 43 // and |error| will be populated with the error.
44 static bool GetWebstoreItemIdFromFrame( 44 static bool GetWebstoreItemIdFromFrame(
45 blink::WebFrame* frame, const std::string& preferred_store_link_url, 45 blink::WebFrame* frame, const std::string& preferred_store_link_url,
46 std::string* webstore_item_id, std::string* error); 46 std::string* webstore_item_id, std::string* error);
47 47
48 DISALLOW_COPY_AND_ASSIGN(WebstoreBindings); 48 DISALLOW_COPY_AND_ASSIGN(WebstoreBindings);
49 }; 49 };
50 50
51 } // namespace extensions 51 } // namespace extensions
52 52
53 #endif // CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_ 53 #endif // CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/tab_finder.h ('k') | chrome/renderer/external_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698