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

Side by Side Diff: content/public/browser/render_view_host_delegate.h

Issue 10073023: TabContents -> WebContentsImpl, part 14. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « content/public/browser/render_view_host.h ('k') | content/public/browser/render_widget_host.h » ('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) 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 CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 struct Referrer; 55 struct Referrer;
56 struct RendererPreferences; 56 struct RendererPreferences;
57 57
58 // 58 //
59 // RenderViewHostDelegate 59 // RenderViewHostDelegate
60 // 60 //
61 // An interface implemented by an object interested in knowing about the state 61 // An interface implemented by an object interested in knowing about the state
62 // of the RenderViewHost. 62 // of the RenderViewHost.
63 // 63 //
64 // This interface currently encompasses every type of message that was 64 // This interface currently encompasses every type of message that was
65 // previously being sent by TabContents itself. Some of these notifications 65 // previously being sent by WebContents itself. Some of these notifications
66 // may not be relevant to all users of RenderViewHost and we should consider 66 // may not be relevant to all users of RenderViewHost and we should consider
67 // exposing a more generic Send function on RenderViewHost and a response 67 // exposing a more generic Send function on RenderViewHost and a response
68 // listener here to serve that need. 68 // listener here to serve that need.
69 // 69 //
70 // TODO(joi): See if we can hide most or all of this from chrome/. 70 // TODO(joi): See if we can hide most or all of this from chrome/.
71 class CONTENT_EXPORT RenderViewHostDelegate : public IPC::Channel::Listener { 71 class CONTENT_EXPORT RenderViewHostDelegate : public IPC::Channel::Listener {
72 public: 72 public:
73 // View ---------------------------------------------------------------------- 73 // View ----------------------------------------------------------------------
74 // Functions that can be routed directly to a view-specific class. 74 // Functions that can be routed directly to a view-specific class.
75 class CONTENT_EXPORT View { 75 class CONTENT_EXPORT View {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Callback to inform the browser that the page is returning the focus to 151 // Callback to inform the browser that the page is returning the focus to
152 // the browser's chrome. If reverse is true, it means the focus was 152 // the browser's chrome. If reverse is true, it means the focus was
153 // retrieved by doing a Shift-Tab. 153 // retrieved by doing a Shift-Tab.
154 virtual void TakeFocus(bool reverse) = 0; 154 virtual void TakeFocus(bool reverse) = 0;
155 155
156 protected: 156 protected:
157 virtual ~View() {} 157 virtual ~View() {}
158 }; 158 };
159 159
160 // RendererManagerment ------------------------------------------------------- 160 // RendererManagerment -------------------------------------------------------
161 // Functions for managing switching of Renderers. For TabContents, this is 161 // Functions for managing switching of Renderers. For WebContents, this is
162 // implemented by the RenderViewHostManager 162 // implemented by the RenderViewHostManager.
163 163
164 class CONTENT_EXPORT RendererManagement { 164 class CONTENT_EXPORT RendererManagement {
165 public: 165 public:
166 // Notification whether we should close the page, after an explicit call to 166 // Notification whether we should close the page, after an explicit call to
167 // AttemptToClosePage. This is called before a cross-site request or before 167 // AttemptToClosePage. This is called before a cross-site request or before
168 // a tab/window is closed (as indicated by the first parameter) to allow the 168 // a tab/window is closed (as indicated by the first parameter) to allow the
169 // appropriate renderer to approve or deny the request. |proceed| indicates 169 // appropriate renderer to approve or deny the request. |proceed| indicates
170 // whether the user chose to proceed. |proceed_time| is the time when the 170 // whether the user chose to proceed. |proceed_time| is the time when the
171 // request was allowed to proceed. 171 // request was allowed to proceed.
172 virtual void ShouldClosePage( 172 virtual void ShouldClosePage(
(...skipping 18 matching lines...) Expand all
191 virtual View* GetViewDelegate(); 191 virtual View* GetViewDelegate();
192 virtual RendererManagement* GetRendererManagementDelegate(); 192 virtual RendererManagement* GetRendererManagementDelegate();
193 193
194 // IPC::Channel::Listener implementation. 194 // IPC::Channel::Listener implementation.
195 // This is used to give the delegate a chance to filter IPC messages. 195 // This is used to give the delegate a chance to filter IPC messages.
196 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 196 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
197 197
198 // Gets the URL that is currently being displayed, if there is one. 198 // Gets the URL that is currently being displayed, if there is one.
199 virtual const GURL& GetURL() const; 199 virtual const GURL& GetURL() const;
200 200
201 // Return this object cast to a TabContents, if it is one. If the object is 201 // Return this object cast to a WebContents, if it is one. If the object is
202 // not a TabContents, returns NULL. DEPRECATED: Be sure to include brettw or 202 // not a WebContents, returns NULL. DEPRECATED: Be sure to include brettw or
203 // jam as reviewers before you use this method. http://crbug.com/82582 203 // jam as reviewers before you use this method. http://crbug.com/82582
204 virtual content::WebContents* GetAsWebContents(); 204 virtual content::WebContents* GetAsWebContents();
205 205
206 // Return type of RenderView which is attached with this object. 206 // Return type of RenderView which is attached with this object.
207 virtual content::ViewType GetRenderViewType() const = 0; 207 virtual content::ViewType GetRenderViewType() const = 0;
208 208
209 // Return the rect where to display the resize corner, if any, otherwise 209 // Return the rect where to display the resize corner, if any, otherwise
210 // an empty rect. 210 // an empty rect.
211 virtual gfx::Rect GetRootWindowResizerRect() const = 0; 211 virtual gfx::Rect GetRootWindowResizerRect() const = 0;
212 212
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // Notification that the view has lost the mouse lock. 407 // Notification that the view has lost the mouse lock.
408 virtual void LostMouseLock() {} 408 virtual void LostMouseLock() {}
409 409
410 protected: 410 protected:
411 virtual ~RenderViewHostDelegate() {} 411 virtual ~RenderViewHostDelegate() {}
412 }; 412 };
413 413
414 } // namespace content 414 } // namespace content
415 415
416 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_ 416 #endif // CONTENT_PUBLIC_BROWSER_RENDER_VIEW_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_view_host.h ('k') | content/public/browser/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698