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

Unified Diff: content/public/browser/web_contents.h

Issue 10830337: Add IPC::Sender and GetRoutingID() to WebContents for convenience and safety. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents.h
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index c6f55f59b1b7b899feca2007186f235a17867578..d68e148c22f9282d91aef074ea2d6400de4c071a 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -14,6 +14,7 @@
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/save_page_type.h"
#include "content/public/browser/web_ui.h"
+#include "ipc/ipc_sender.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/native_widget_types.h"
#include "webkit/glue/window_open_disposition.h"
@@ -45,7 +46,7 @@ class WebContentsView;
struct RendererPreferences;
// Describes what goes in the main content area of a tab.
-class WebContents : public PageNavigator {
+class WebContents : public PageNavigator, public IPC::Sender {
public:
// |base_web_contents| is used if we want to size the new WebContents's view
// based on the view of an existing WebContents. This can be NULL if not
@@ -110,6 +111,10 @@ class WebContents : public PageNavigator {
// Gets the current RenderViewHost for this tab.
virtual RenderViewHost* GetRenderViewHost() const = 0;
+ // Gets the current RenderViewHost's routing id. Returns
+ // MSG_ROUTING_NONE when there is no RenderViewHost.
+ virtual int GetRoutingID() const = 0;
+
// Returns the currently active RenderWidgetHostView. This may change over
// time and can be NULL (during setup and teardown).
virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const = 0;
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698