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

Side by Side Diff: chrome/browser/extensions/extension_host.h

Issue 7729002: Handle the ViewHostMsg_RunFileChooser IPC message which is sent by content(renderer) in RVH and (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.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) 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_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 content::BrowserContext* browser_context) const OVERRIDE; 141 content::BrowserContext* browser_context) const OVERRIDE;
142 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 142 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
143 bool* is_keyboard_shortcut) OVERRIDE; 143 bool* is_keyboard_shortcut) OVERRIDE;
144 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) 144 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event)
145 OVERRIDE; 145 OVERRIDE;
146 virtual void HandleMouseMove() OVERRIDE; 146 virtual void HandleMouseMove() OVERRIDE;
147 virtual void HandleMouseDown() OVERRIDE; 147 virtual void HandleMouseDown() OVERRIDE;
148 virtual void HandleMouseLeave() OVERRIDE; 148 virtual void HandleMouseLeave() OVERRIDE;
149 virtual void HandleMouseUp() OVERRIDE; 149 virtual void HandleMouseUp() OVERRIDE;
150 virtual void HandleMouseActivate() OVERRIDE; 150 virtual void HandleMouseActivate() OVERRIDE;
151 virtual void RunFileChooser(RenderViewHost* render_view_host,
152 const ViewHostMsg_RunFileChooser_Params& params);
151 153
152 // RenderViewHostDelegate::View 154 // RenderViewHostDelegate::View
153 virtual void CreateNewWindow( 155 virtual void CreateNewWindow(
154 int route_id, 156 int route_id,
155 const ViewHostMsg_CreateWindow_Params& params); 157 const ViewHostMsg_CreateWindow_Params& params);
156 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type); 158 virtual void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type);
157 virtual void CreateNewFullscreenWidget(int route_id); 159 virtual void CreateNewFullscreenWidget(int route_id);
158 virtual void ShowCreatedWindow(int route_id, 160 virtual void ShowCreatedWindow(int route_id,
159 WindowOpenDisposition disposition, 161 WindowOpenDisposition disposition,
160 const gfx::Rect& initial_pos, 162 const gfx::Rect& initial_pos,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void CreateRenderViewNow(); 217 void CreateRenderViewNow();
216 218
217 // Const version of below function. 219 // Const version of below function.
218 const Browser* GetBrowser() const; 220 const Browser* GetBrowser() const;
219 221
220 // ExtensionFunctionDispatcher::Delegate 222 // ExtensionFunctionDispatcher::Delegate
221 virtual Browser* GetBrowser(); 223 virtual Browser* GetBrowser();
222 virtual gfx::NativeView GetNativeViewOfHost(); 224 virtual gfx::NativeView GetNativeViewOfHost();
223 225
224 // Message handlers. 226 // Message handlers.
225 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params);
226 void OnRequest(const ExtensionHostMsg_Request_Params& params); 227 void OnRequest(const ExtensionHostMsg_Request_Params& params);
227 228
228 // Handles keyboard events that were not handled by HandleKeyboardEvent(). 229 // Handles keyboard events that were not handled by HandleKeyboardEvent().
229 // Platform specific implementation may override this method to handle the 230 // Platform specific implementation may override this method to handle the
230 // event in platform specific way. 231 // event in platform specific way.
231 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {} 232 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {}
232 233
233 // Returns true if we're hosting a background page. 234 // Returns true if we're hosting a background page.
234 // This isn't valid until CreateRenderView is called. 235 // This isn't valid until CreateRenderView is called.
235 bool is_background_page() const { return !view(); } 236 bool is_background_page() const { return !view(); }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Only EXTENSION_INFOBAR, EXTENSION_POPUP, and EXTENSION_BACKGROUND_PAGE 275 // Only EXTENSION_INFOBAR, EXTENSION_POPUP, and EXTENSION_BACKGROUND_PAGE
275 // are used here, others are not hosted by ExtensionHost. 276 // are used here, others are not hosted by ExtensionHost.
276 ViewType::Type extension_host_type_; 277 ViewType::Type extension_host_type_;
277 278
278 // The relevant TabContents associated with this ExtensionHost, if any. 279 // The relevant TabContents associated with this ExtensionHost, if any.
279 TabContents* associated_tab_contents_; 280 TabContents* associated_tab_contents_;
280 281
281 // Used to measure how long it's been since the host was created. 282 // Used to measure how long it's been since the host was created.
282 PerfTimer since_created_; 283 PerfTimer since_created_;
283 284
284 // FileSelectHelper, lazily created.
285 scoped_ptr<FileSelectHelper> file_select_helper_;
286
287 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 285 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
288 }; 286 };
289 287
290 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 288 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698