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

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

Issue 3209002: Input file type now supported in extension popups. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Synced Created 10 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
« 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <list> 10 #include <list>
11 11
12 #include "base/perftimer.h" 12 #include "base/perftimer.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "chrome/browser/extensions/extension_function_dispatcher.h" 14 #include "chrome/browser/extensions/extension_function_dispatcher.h"
15 #include "chrome/browser/jsmessage_box_client.h" 15 #include "chrome/browser/jsmessage_box_client.h"
16 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 16 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
17 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" 17 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
18 #if defined(TOOLKIT_VIEWS) 18 #if defined(TOOLKIT_VIEWS)
19 #include "chrome/browser/views/extensions/extension_view.h" 19 #include "chrome/browser/views/extensions/extension_view.h"
20 #elif defined(OS_MACOSX) 20 #elif defined(OS_MACOSX)
21 #include "chrome/browser/cocoa/extension_view_mac.h" 21 #include "chrome/browser/cocoa/extension_view_mac.h"
22 #elif defined(TOOLKIT_GTK) 22 #elif defined(TOOLKIT_GTK)
23 #include "chrome/browser/gtk/extension_view_gtk.h" 23 #include "chrome/browser/gtk/extension_view_gtk.h"
24 #endif 24 #endif
25 #include "chrome/common/notification_registrar.h" 25 #include "chrome/common/notification_registrar.h"
26 26
27 class Browser; 27 class Browser;
28 class Extension; 28 class Extension;
29 class FileSelectHelper;
29 class RenderProcessHost; 30 class RenderProcessHost;
30 class RenderWidgetHostView; 31 class RenderWidgetHostView;
31 class TabContents; 32 class TabContents;
32 struct WebPreferences; 33 struct WebPreferences;
33 34
34 // This class is the browser component of an extension component's RenderView. 35 // This class is the browser component of an extension component's RenderView.
35 // It handles setting up the renderer process, if needed, with special 36 // It handles setting up the renderer process, if needed, with special
36 // privileges available to extensions. It may have a view to be shown in the 37 // privileges available to extensions. It may have a view to be shown in the
37 // in the browser UI, or it may be hidden. 38 // in the browser UI, or it may be hidden.
38 class ExtensionHost : public RenderViewHostDelegate, 39 class ExtensionHost : public RenderViewHostDelegate,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 109
109 // Tell the renderer not to draw scrollbars on windows smaller than 110 // Tell the renderer not to draw scrollbars on windows smaller than
110 // |size_limit| in both width and height. 111 // |size_limit| in both width and height.
111 void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit); 112 void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit);
112 113
113 // RenderViewHostDelegate implementation. 114 // RenderViewHostDelegate implementation.
114 virtual RenderViewHostDelegate::View* GetViewDelegate(); 115 virtual RenderViewHostDelegate::View* GetViewDelegate();
115 virtual const GURL& GetURL() const { return url_; } 116 virtual const GURL& GetURL() const { return url_; }
116 virtual void RenderViewCreated(RenderViewHost* render_view_host); 117 virtual void RenderViewCreated(RenderViewHost* render_view_host);
117 virtual ViewType::Type GetRenderViewType() const; 118 virtual ViewType::Type GetRenderViewType() const;
119 virtual FileSelect* GetFileSelectDelegate();
118 virtual int GetBrowserWindowID() const; 120 virtual int GetBrowserWindowID() const;
119 virtual void RenderViewGone(RenderViewHost* render_view_host); 121 virtual void RenderViewGone(RenderViewHost* render_view_host);
120 virtual void DidNavigate(RenderViewHost* render_view_host, 122 virtual void DidNavigate(RenderViewHost* render_view_host,
121 const ViewHostMsg_FrameNavigate_Params& params); 123 const ViewHostMsg_FrameNavigate_Params& params);
122 virtual void DidStopLoading(); 124 virtual void DidStopLoading();
123 virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host); 125 virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host);
124 virtual void DocumentOnLoadCompletedInMainFrame( 126 virtual void DocumentOnLoadCompletedInMainFrame(
125 RenderViewHost* render_view_host); 127 RenderViewHost* render_view_host);
126 128
127 virtual WebPreferences GetWebkitPrefs(); 129 virtual WebPreferences GetWebkitPrefs();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 // Only EXTENSION_INFOBAR, EXTENSION_POPUP, and EXTENSION_BACKGROUND_PAGE 263 // Only EXTENSION_INFOBAR, EXTENSION_POPUP, and EXTENSION_BACKGROUND_PAGE
262 // are used here, others are not hosted by ExtensionHost. 264 // are used here, others are not hosted by ExtensionHost.
263 ViewType::Type extension_host_type_; 265 ViewType::Type extension_host_type_;
264 266
265 // The relevant TabContents associated with this ExtensionHost, if any. 267 // The relevant TabContents associated with this ExtensionHost, if any.
266 TabContents* associated_tab_contents_; 268 TabContents* associated_tab_contents_;
267 269
268 // Used to measure how long it's been since the host was created. 270 // Used to measure how long it's been since the host was created.
269 PerfTimer since_created_; 271 PerfTimer since_created_;
270 272
273 // FileSelectHelper, lazily created.
274 scoped_ptr<FileSelectHelper> file_select_helper_;
275
271 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 276 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
272 }; 277 };
273 278
274 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 279 #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