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

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

Issue 6374009: Get rid of a few more interfaces from RenderViewHostDelegate that aren't need... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « chrome/browser/download/save_package.cc ('k') | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Sets |url_| and navigates |render_view_host_|. 99 // Sets |url_| and navigates |render_view_host_|.
100 void NavigateToURL(const GURL& url); 100 void NavigateToURL(const GURL& url);
101 101
102 // Insert a default style sheet for Extension Infobars. 102 // Insert a default style sheet for Extension Infobars.
103 void InsertInfobarCSS(); 103 void InsertInfobarCSS();
104 104
105 // Tell the renderer not to draw scrollbars on windows smaller than 105 // Tell the renderer not to draw scrollbars on windows smaller than
106 // |size_limit| in both width and height. 106 // |size_limit| in both width and height.
107 void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit); 107 void DisableScrollbarsForSmallWindows(const gfx::Size& size_limit);
108 108
109 // RenderViewHostDelegate::View implementation. 109 // RenderViewHostDelegate implementation.
110 virtual bool OnMessageReceived(const IPC::Message& message);
110 virtual const GURL& GetURL() const; 111 virtual const GURL& GetURL() const;
111 virtual void RenderViewCreated(RenderViewHost* render_view_host); 112 virtual void RenderViewCreated(RenderViewHost* render_view_host);
112 virtual ViewType::Type GetRenderViewType() const; 113 virtual ViewType::Type GetRenderViewType() const;
113 virtual FileSelect* GetFileSelectDelegate();
114 virtual int GetBrowserWindowID() const; 114 virtual int GetBrowserWindowID() const;
115 virtual void RenderViewGone(RenderViewHost* render_view_host, 115 virtual void RenderViewGone(RenderViewHost* render_view_host,
116 base::TerminationStatus status, 116 base::TerminationStatus status,
117 int error_code); 117 int error_code);
118 virtual void DidNavigate(RenderViewHost* render_view_host, 118 virtual void DidNavigate(RenderViewHost* render_view_host,
119 const ViewHostMsg_FrameNavigate_Params& params); 119 const ViewHostMsg_FrameNavigate_Params& params);
120 virtual void DidStopLoading(); 120 virtual void DidStopLoading();
121 virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host); 121 virtual void DocumentAvailableInMainFrame(RenderViewHost* render_view_host);
122 virtual void DocumentOnLoadCompletedInMainFrame( 122 virtual void DocumentOnLoadCompletedInMainFrame(
123 RenderViewHost* render_view_host, 123 RenderViewHost* render_view_host,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Actually create the RenderView for this host. See CreateRenderViewSoon. 219 // Actually create the RenderView for this host. See CreateRenderViewSoon.
220 void CreateRenderViewNow(); 220 void CreateRenderViewNow();
221 221
222 // Const version of below function. 222 // Const version of below function.
223 const Browser* GetBrowser() const; 223 const Browser* GetBrowser() const;
224 224
225 // ExtensionFunctionDispatcher::Delegate 225 // ExtensionFunctionDispatcher::Delegate
226 virtual Browser* GetBrowser(); 226 virtual Browser* GetBrowser();
227 virtual gfx::NativeView GetNativeViewOfHost(); 227 virtual gfx::NativeView GetNativeViewOfHost();
228 228
229 // Message handlers.
230 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params);
231
229 // Handles keyboard events that were not handled by HandleKeyboardEvent(). 232 // Handles keyboard events that were not handled by HandleKeyboardEvent().
230 // Platform specific implementation may override this method to handle the 233 // Platform specific implementation may override this method to handle the
231 // event in platform specific way. 234 // event in platform specific way.
232 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {} 235 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {}
233 236
234 // Returns true if we're hosting a background page. 237 // Returns true if we're hosting a background page.
235 // This isn't valid until CreateRenderView is called. 238 // This isn't valid until CreateRenderView is called.
236 bool is_background_page() const { return !view(); } 239 bool is_background_page() const { return !view(); }
237 240
238 // The extension that we're hosting in this view. 241 // The extension that we're hosting in this view.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // 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.
280 PerfTimer since_created_; 283 PerfTimer since_created_;
281 284
282 // FileSelectHelper, lazily created. 285 // FileSelectHelper, lazily created.
283 scoped_ptr<FileSelectHelper> file_select_helper_; 286 scoped_ptr<FileSelectHelper> file_select_helper_;
284 287
285 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); 288 DISALLOW_COPY_AND_ASSIGN(ExtensionHost);
286 }; 289 };
287 290
288 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ 291 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698