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

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

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty -> is_empty Created 8 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_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ExtensionDispatcher* extension_dispatcher); 52 ExtensionDispatcher* extension_dispatcher);
53 virtual ~ExtensionHelper(); 53 virtual ~ExtensionHelper();
54 54
55 // Starts installation of the page in the specified frame as a web app. The 55 // Starts installation of the page in the specified frame as a web app. The
56 // page must link to an external 'definition file'. This is different from 56 // page must link to an external 'definition file'. This is different from
57 // the 'application shortcuts' feature where we pull the application 57 // the 'application shortcuts' feature where we pull the application
58 // definition out of optional meta tags in the page. 58 // definition out of optional meta tags in the page.
59 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame, 59 bool InstallWebApplicationUsingDefinitionFile(WebKit::WebFrame* frame,
60 string16* error); 60 string16* error);
61 61
62 int tab_id() const { return tab_id_; }
62 int browser_window_id() const { return browser_window_id_; } 63 int browser_window_id() const { return browser_window_id_; }
63 chrome::ViewType view_type() const { return view_type_; } 64 chrome::ViewType view_type() const { return view_type_; }
64 65
65 private: 66 private:
66 // RenderViewObserver implementation. 67 // RenderViewObserver implementation.
67 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 68 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
68 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE; 69 virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) OVERRIDE;
69 virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE; 70 virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE;
70 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) OVERRIDE; 71 virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) OVERRIDE;
71 virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) OVERRIDE; 72 virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) OVERRIDE;
(...skipping 13 matching lines...) Expand all
85 const std::string& channel_name, 86 const std::string& channel_name,
86 const std::string& tab_json, 87 const std::string& tab_json,
87 const std::string& source_extension_id, 88 const std::string& source_extension_id,
88 const std::string& target_extension_id); 89 const std::string& target_extension_id);
89 void OnExtensionDeliverMessage(int target_port_id, 90 void OnExtensionDeliverMessage(int target_port_id,
90 const std::string& message); 91 const std::string& message);
91 void OnExtensionDispatchOnDisconnect(int port_id, bool connection_error); 92 void OnExtensionDispatchOnDisconnect(int port_id, bool connection_error);
92 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params); 93 void OnExecuteCode(const ExtensionMsg_ExecuteCode_Params& params);
93 void OnGetApplicationInfo(int page_id); 94 void OnGetApplicationInfo(int page_id);
94 void OnNotifyRendererViewType(chrome::ViewType view_type); 95 void OnNotifyRendererViewType(chrome::ViewType view_type);
96 void OnSetTabId(int tab_id);
95 void OnUpdateBrowserWindowId(int window_id); 97 void OnUpdateBrowserWindowId(int window_id);
96 98
97 // Callback triggered when we finish downloading the application definition 99 // Callback triggered when we finish downloading the application definition
98 // file. 100 // file.
99 void DidDownloadApplicationDefinition(const WebKit::WebURLResponse& response, 101 void DidDownloadApplicationDefinition(const WebKit::WebURLResponse& response,
100 const std::string& data); 102 const std::string& data);
101 103
102 // Callback triggered after each icon referenced by the application definition 104 // Callback triggered after each icon referenced by the application definition
103 // is downloaded. 105 // is downloaded.
104 void DidDownloadApplicationIcon(webkit_glue::ImageResourceFetcher* fetcher, 106 void DidDownloadApplicationIcon(webkit_glue::ImageResourceFetcher* fetcher,
(...skipping 17 matching lines...) Expand all
122 ImageResourceFetcherList; 124 ImageResourceFetcherList;
123 ImageResourceFetcherList app_icon_fetchers_; 125 ImageResourceFetcherList app_icon_fetchers_;
124 126
125 // The number of app icon requests outstanding. When this reaches zero, we're 127 // The number of app icon requests outstanding. When this reaches zero, we're
126 // done processing an app definition file. 128 // done processing an app definition file.
127 int pending_app_icon_requests_; 129 int pending_app_icon_requests_;
128 130
129 // Type of view attached with RenderView. 131 // Type of view attached with RenderView.
130 chrome::ViewType view_type_; 132 chrome::ViewType view_type_;
131 133
134 // Id of the tab which the RenderView is attached to.
135 int tab_id_;
136
132 // Id number of browser window which RenderView is attached to. 137 // Id number of browser window which RenderView is attached to.
133 int browser_window_id_; 138 int browser_window_id_;
134 139
135 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper); 140 DISALLOW_COPY_AND_ASSIGN(ExtensionHelper);
136 }; 141 };
137 142
138 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_ 143 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_dispatcher.cc ('k') | chrome/renderer/extensions/extension_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698