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

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

Issue 217183004: Migrate addMessageToConsole API to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + fix the test_runner Created 6 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
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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 class CONTENT_EXPORT RenderViewHostDelegate { 76 class CONTENT_EXPORT RenderViewHostDelegate {
77 public: 77 public:
78 // Returns the current delegate associated with a feature. May return NULL if 78 // Returns the current delegate associated with a feature. May return NULL if
79 // there is no corresponding delegate. 79 // there is no corresponding delegate.
80 virtual RenderViewHostDelegateView* GetDelegateView(); 80 virtual RenderViewHostDelegateView* GetDelegateView();
81 81
82 // This is used to give the delegate a chance to filter IPC messages. 82 // This is used to give the delegate a chance to filter IPC messages.
83 virtual bool OnMessageReceived(RenderViewHost* render_view_host, 83 virtual bool OnMessageReceived(RenderViewHost* render_view_host,
84 const IPC::Message& message); 84 const IPC::Message& message);
85 85
86 // Gets the URL that is currently being displayed, if there is one.
87 virtual const GURL& GetURL() const;
88
89 // Return this object cast to a WebContents, if it is one. If the object is 86 // Return this object cast to a WebContents, if it is one. If the object is
90 // not a WebContents, returns NULL. DEPRECATED: Be sure to include brettw or 87 // not a WebContents, returns NULL. DEPRECATED: Be sure to include brettw or
91 // jam as reviewers before you use this method. http://crbug.com/82582 88 // jam as reviewers before you use this method. http://crbug.com/82582
92 virtual WebContents* GetAsWebContents(); 89 virtual WebContents* GetAsWebContents();
93 90
94 // Return the rect where to display the resize corner, if any, otherwise 91 // Return the rect where to display the resize corner, if any, otherwise
95 // an empty rect. 92 // an empty rect.
96 virtual gfx::Rect GetRootWindowResizerRect() const = 0; 93 virtual gfx::Rect GetRootWindowResizerRect() const = 0;
97 94
98 // The RenderView is being constructed (message sent to the renderer process 95 // The RenderView is being constructed (message sent to the renderer process
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const GURL& frame_url, 174 const GURL& frame_url,
178 JavaScriptMessageType type, 175 JavaScriptMessageType type,
179 IPC::Message* reply_msg, 176 IPC::Message* reply_msg,
180 bool* did_suppress_message) {} 177 bool* did_suppress_message) {}
181 178
182 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, 179 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh,
183 const base::string16& message, 180 const base::string16& message,
184 bool is_reload, 181 bool is_reload,
185 IPC::Message* reply_msg) {} 182 IPC::Message* reply_msg) {}
186 183
187 // A message was added to to the console.
188 virtual bool AddMessageToConsole(int32 level,
189 const base::string16& message,
190 int32 line_no,
191 const base::string16& source_id);
192
193 // Return a dummy RendererPreferences object that will be used by the renderer 184 // Return a dummy RendererPreferences object that will be used by the renderer
194 // associated with the owning RenderViewHost. 185 // associated with the owning RenderViewHost.
195 virtual RendererPreferences GetRendererPrefs( 186 virtual RendererPreferences GetRendererPrefs(
196 BrowserContext* browser_context) const = 0; 187 BrowserContext* browser_context) const = 0;
197 188
198 // Returns a WebPreferences object that will be used by the renderer 189 // Returns a WebPreferences object that will be used by the renderer
199 // associated with the owning render view host. 190 // associated with the owning render view host.
200 virtual WebPreferences GetWebkitPrefs(); 191 virtual WebPreferences GetWebkitPrefs();
201 192
202 // Notification the user has made a gesture while focus was on the 193 // Notification the user has made a gesture while focus was on the
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 virtual void AccessibilityEventReceived( 334 virtual void AccessibilityEventReceived(
344 const std::vector<AXEventNotificationDetails>& details) {} 335 const std::vector<AXEventNotificationDetails>& details) {}
345 336
346 protected: 337 protected:
347 virtual ~RenderViewHostDelegate() {} 338 virtual ~RenderViewHostDelegate() {}
348 }; 339 };
349 340
350 } // namespace content 341 } // namespace content
351 342
352 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 343 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/renderer_host/render_view_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698