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

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

Issue 7795032: Add link URL and success/failure callback parameters to chrome.webstore.install() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_EXTENSION_RENDER_VIEW_HELPER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_RENDER_VIEW_HELPER_H_
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_RENDER_VIEW_HELPER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_RENDER_VIEW_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 24 matching lines...) Expand all
35 ExtensionRendererContext* extension_renderer_context); 35 ExtensionRendererContext* extension_renderer_context);
36 virtual ~ExtensionRenderViewHelper(); 36 virtual ~ExtensionRenderViewHelper();
37 37
38 // Starts installation of the page in the specified frame as a web app. The 38 // Starts installation of the page in the specified frame as a web app. The
39 // page must link to an external 'definition file'. This is different from 39 // page must link to an external 'definition file'. This is different from
40 // the 'application shortcuts' feature where we pull the application 40 // the 'application shortcuts' feature where we pull the application
41 // definition out of optional meta tags in the page. 41 // definition out of optional meta tags in the page.
42 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame, 42 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame,
43 string16* error); 43 string16* error);
44 44
45 void InlineWebstoreInstall(std::string webstore_item_id); 45 void InlineWebstoreInstall(int install_id,
46 std::string webstore_item_id,
47 GURL requestor_url);
46 48
47 int browser_window_id() const { return browser_window_id_; } 49 int browser_window_id() const { return browser_window_id_; }
48 ViewType::Type view_type() const { return view_type_; } 50 ViewType::Type view_type() const { return view_type_; }
49 51
50 private: 52 private:
51 // RenderViewObserver implementation. 53 // RenderViewObserver implementation.
52 virtual bool OnMessageReceived(const IPC::Message& message); 54 virtual bool OnMessageReceived(const IPC::Message& message);
53 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame); 55 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame);
54 virtual void DidFinishLoad(WebKit::WebFrame* frame); 56 virtual void DidFinishLoad(WebKit::WebFrame* frame);
55 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame); 57 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame);
56 virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame); 58 virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame);
57 virtual void FrameDetached(WebKit::WebFrame* frame); 59 virtual void FrameDetached(WebKit::WebFrame* frame);
58 virtual void DidCreateDataSource(WebKit::WebFrame* frame, 60 virtual void DidCreateDataSource(WebKit::WebFrame* frame,
59 WebKit::WebDataSource* ds); 61 WebKit::WebDataSource* ds);
60 62
61 void OnExtensionResponse(int request_id, bool success, 63 void OnExtensionResponse(int request_id, bool success,
62 const std::string& response, 64 const std::string& response,
63 const std::string& error); 65 const std::string& error);
64 void OnExtensionMessageInvoke(const std::string& extension_id, 66 void OnExtensionMessageInvoke(const std::string& extension_id,
65 const std::string& function_name, 67 const std::string& function_name,
66 const base::ListValue& args, 68 const base::ListValue& args,
67 const GURL& event_url); 69 const GURL& event_url);
68 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params); 70 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params);
69 void OnGetApplicationInfo(int page_id); 71 void OnGetApplicationInfo(int page_id);
70 void OnNotifyRendererViewType(ViewType::Type view_type); 72 void OnNotifyRendererViewType(ViewType::Type view_type);
71 void OnUpdateBrowserWindowId(int window_id); 73 void OnUpdateBrowserWindowId(int window_id);
72 void OnInlineWebstoreInstallResponse(bool success, const std::string& error); 74 void OnInlineWebstoreInstallResponse(
75 int install_id, bool success, const std::string& error);
73 76
74 // Callback triggered when we finish downloading the application definition 77 // Callback triggered when we finish downloading the application definition
75 // file. 78 // file.
76 void DidDownloadApplicationDefinition(const WebKit::WebURLResponse& response, 79 void DidDownloadApplicationDefinition(const WebKit::WebURLResponse& response,
77 const std::string& data); 80 const std::string& data);
78 81
79 // Callback triggered after each icon referenced by the application definition 82 // Callback triggered after each icon referenced by the application definition
80 // is downloaded. 83 // is downloaded.
81 void DidDownloadApplicationIcon(webkit_glue::ImageResourceFetcher* fetcher, 84 void DidDownloadApplicationIcon(webkit_glue::ImageResourceFetcher* fetcher,
82 const SkBitmap& image); 85 const SkBitmap& image);
(...skipping 21 matching lines...) Expand all
104 // Type of view attached with RenderView. 107 // Type of view attached with RenderView.
105 ViewType::Type view_type_; 108 ViewType::Type view_type_;
106 109
107 // Id number of browser window which RenderView is attached to. 110 // Id number of browser window which RenderView is attached to.
108 int browser_window_id_; 111 int browser_window_id_;
109 112
110 DISALLOW_COPY_AND_ASSIGN(ExtensionRenderViewHelper); 113 DISALLOW_COPY_AND_ASSIGN(ExtensionRenderViewHelper);
111 }; 114 };
112 115
113 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_RENDER_VIEW_HELPER_H_ 116 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_RENDER_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/chrome_webstore_bindings.cc ('k') | chrome/renderer/extensions/extension_render_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698