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

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

Issue 6330007: Don't use GetAsTabContents. Send notifications from TabContentsView instead. (Closed) Base URL: svn://svn.chromium.org/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
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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_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 28 matching lines...) Expand all
39 struct RendererPreferences; 39 struct RendererPreferences;
40 class RenderProcessHost; 40 class RenderProcessHost;
41 class RenderViewHost; 41 class RenderViewHost;
42 class ResourceRedirectDetails; 42 class ResourceRedirectDetails;
43 class ResourceRequestDetails; 43 class ResourceRequestDetails;
44 class SkBitmap; 44 class SkBitmap;
45 class SSLClientAuthHandler; 45 class SSLClientAuthHandler;
46 class SSLAddCertHandler; 46 class SSLAddCertHandler;
47 class TabContents; 47 class TabContents;
48 struct ThumbnailScore; 48 struct ThumbnailScore;
49 struct ViewHostMsg_CreateWindow_Params;
49 struct ViewHostMsg_DidPrintPage_Params; 50 struct ViewHostMsg_DidPrintPage_Params;
50 struct ViewHostMsg_DomMessage_Params; 51 struct ViewHostMsg_DomMessage_Params;
51 struct ViewHostMsg_FrameNavigate_Params; 52 struct ViewHostMsg_FrameNavigate_Params;
52 struct ViewHostMsg_PageHasOSDD_Type; 53 struct ViewHostMsg_PageHasOSDD_Type;
53 struct ViewHostMsg_RunFileChooser_Params; 54 struct ViewHostMsg_RunFileChooser_Params;
54 struct WebApplicationInfo; 55 struct WebApplicationInfo;
55 struct WebDropData; 56 struct WebDropData;
56 struct WebMenuItem; 57 struct WebMenuItem;
57 class WebKeyboardEvent; 58 class WebKeyboardEvent;
58 struct WebPreferences; 59 struct WebPreferences;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // exposing a more generic Send function on RenderViewHost and a response 95 // exposing a more generic Send function on RenderViewHost and a response
95 // listener here to serve that need. 96 // listener here to serve that need.
96 // 97 //
97 class RenderViewHostDelegate : public IPC::Channel::Listener { 98 class RenderViewHostDelegate : public IPC::Channel::Listener {
98 public: 99 public:
99 // View ---------------------------------------------------------------------- 100 // View ----------------------------------------------------------------------
100 // Functions that can be routed directly to a view-specific class. 101 // Functions that can be routed directly to a view-specific class.
101 102
102 class View { 103 class View {
103 public: 104 public:
104 // The page is trying to open a new page (e.g. a popup window). The 105 // The page is trying to open a new page (e.g. a popup window). The window
105 // window should be created associated with the given route, but it should 106 // should be created associated with the given route, but it should not be
106 // not be shown yet. That should happen in response to ShowCreatedWindow. 107 // shown yet. That should happen in response to ShowCreatedWindow.
107 // |window_container_type| describes the type of RenderViewHost container 108 // |params.window_container_type| describes the type of RenderViewHost
108 // that is requested -- in particular, the window.open call may have 109 // container that is requested -- in particular, the window.open call may
109 // specified 'background' and 'persistent' in the feature string. 110 // have specified 'background' and 'persistent' in the feature string.
110 // 111 //
111 // The passed |frame_name| parameter is the name parameter that was passed 112 // The passed |params.frame_name| parameter is the name parameter that was
112 // to window.open(), and will be empty if none was passed. 113 // passed to window.open(), and will be empty if none was passed.
113 // 114 //
114 // Note: this is not called "CreateWindow" because that will clash with 115 // Note: this is not called "CreateWindow" because that will clash with
115 // the Windows function which is actually a #define. 116 // the Windows function which is actually a #define.
116 // 117 //
117 // NOTE: this takes ownership of @modal_dialog_event 118 // NOTE: this takes ownership of @modal_dialog_event
118 virtual void CreateNewWindow( 119 virtual void CreateNewWindow(
119 int route_id, 120 int route_id,
120 WindowContainerType window_container_type, 121 const ViewHostMsg_CreateWindow_Params& params) = 0;
121 const string16& frame_name) = 0;
122 122
123 // The page is trying to open a new widget (e.g. a select popup). The 123 // The page is trying to open a new widget (e.g. a select popup). The
124 // widget should be created associated with the given route, but it should 124 // widget should be created associated with the given route, but it should
125 // not be shown yet. That should happen in response to ShowCreatedWidget. 125 // not be shown yet. That should happen in response to ShowCreatedWidget.
126 // |popup_type| indicates if the widget is a popup and what kind of popup it 126 // |popup_type| indicates if the widget is a popup and what kind of popup it
127 // is (select, autofill...). 127 // is (select, autofill...).
128 virtual void CreateNewWidget(int route_id, 128 virtual void CreateNewWidget(int route_id,
129 WebKit::WebPopupType popup_type) = 0; 129 WebKit::WebPopupType popup_type) = 0;
130 130
131 // Creates a full screen RenderWidget. Similar to above. 131 // Creates a full screen RenderWidget. Similar to above.
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 GetAutomationResourceRoutingDelegate(); 480 GetAutomationResourceRoutingDelegate();
481 481
482 // IPC::Channel::Listener implementation. 482 // IPC::Channel::Listener implementation.
483 // This is used to give the delegate a chance to filter IPC messages. 483 // This is used to give the delegate a chance to filter IPC messages.
484 virtual bool OnMessageReceived(const IPC::Message& message); 484 virtual bool OnMessageReceived(const IPC::Message& message);
485 485
486 // Gets the URL that is currently being displayed, if there is one. 486 // Gets the URL that is currently being displayed, if there is one.
487 virtual const GURL& GetURL() const; 487 virtual const GURL& GetURL() const;
488 488
489 // Return this object cast to a TabContents, if it is one. If the object is 489 // Return this object cast to a TabContents, if it is one. If the object is
490 // not a TabContents, returns NULL. 490 // not a TabContents, returns NULL. DEPRECATED: Be sure to include brettw and
491 // jam as reviewers before you use this method.
491 virtual TabContents* GetAsTabContents(); 492 virtual TabContents* GetAsTabContents();
492 493
493 // Return this object cast to a BackgroundContents, if it is one. If the 494 // Return this object cast to a BackgroundContents, if it is one. If the
494 // object is not a BackgroundContents, returns NULL. 495 // object is not a BackgroundContents, returns NULL.
495 virtual BackgroundContents* GetAsBackgroundContents(); 496 virtual BackgroundContents* GetAsBackgroundContents();
496 497
497 // Return id number of browser window which this object is attached to. If no 498 // Return id number of browser window which this object is attached to. If no
498 // browser window is attached to, just return -1. 499 // browser window is attached to, just return -1.
499 virtual int GetBrowserWindowID() const = 0; 500 virtual int GetBrowserWindowID() const = 0;
500 501
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 bool remember) {} 677 bool remember) {}
677 678
678 // Notification that a worker process has crashed. 679 // Notification that a worker process has crashed.
679 void WorkerCrashed() {} 680 void WorkerCrashed() {}
680 681
681 protected: 682 protected:
682 virtual ~RenderViewHostDelegate() {} 683 virtual ~RenderViewHostDelegate() {}
683 }; 684 };
684 685
685 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 686 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/renderer_host/render_widget_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698