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

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

Issue 175263003: Add chrome.webstore API methods to allow sites to see progress of installation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 9 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 (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/renderer/extensions/chrome_v8_extension.h" 9 #include "chrome/renderer/extensions/chrome_v8_extension.h"
10 #include "third_party/WebKit/public/web/WebFrame.h" 10 #include "third_party/WebKit/public/web/WebFrame.h"
(...skipping 12 matching lines...) Expand all
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( 30 void OnInlineWebstoreInstallResponse(
31 int install_id, bool success, const std::string& error); 31 int install_id, bool success, const std::string& error);
32 32
33 void OnInlineInstallStageChanged(int stage);
34
35 void OnInlineInstallDownloadProgress(int percent_downloaded);
36
33 // Extracts a Web Store item ID from a <link rel="chrome-webstore-item" 37 // Extracts a Web Store item ID from a <link rel="chrome-webstore-item"
34 // href="https://chrome.google.com/webstore/detail/id"> node found in the 38 // href="https://chrome.google.com/webstore/detail/id"> node found in the
35 // frame. On success, true will be returned and the |webstore_item_id| 39 // frame. On success, true will be returned and the |webstore_item_id|
36 // parameter will be populated with the ID. On failure, false will be returned 40 // parameter will be populated with the ID. On failure, false will be returned
37 // and |error| will be populated with the error. 41 // and |error| will be populated with the error.
38 static bool GetWebstoreItemIdFromFrame( 42 static bool GetWebstoreItemIdFromFrame(
39 blink::WebFrame* frame, const std::string& preferred_store_link_url, 43 blink::WebFrame* frame, const std::string& preferred_store_link_url,
40 std::string* webstore_item_id, std::string* error); 44 std::string* webstore_item_id, std::string* error);
41 45
42 DISALLOW_COPY_AND_ASSIGN(WebstoreBindings); 46 DISALLOW_COPY_AND_ASSIGN(WebstoreBindings);
43 }; 47 };
44 48
45 } // namespace extensions 49 } // namespace extensions
46 50
47 #endif // CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_ 51 #endif // CHROME_RENDERER_EXTENSIONS_WEBSTORE_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/chrome_extension_messages.h ('k') | chrome/renderer/extensions/webstore_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698