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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.h

Issue 10965048: [BrowserTag] Send dib info with NavigateGuest message, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments from Fady + remove commented code. Created 8 years, 2 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 // A BrowserPluginGuest represents the browser side of browser <--> renderer 5 // A BrowserPluginGuest represents the browser side of browser <--> renderer
6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of 6 // communication. A BrowserPlugin (a WebPlugin) is on the renderer side of
7 // browser <--> guest renderer communication. The 'guest' renderer is a 7 // browser <--> guest renderer communication. The 'guest' renderer is a
8 // <browser> tag. 8 // <browser> tag.
9 // 9 //
10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a 10 // BrowserPluginGuest lives on the UI thread of the browser process. It has a
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 int64 frame_id, 86 int64 frame_id,
87 bool is_main_frame, 87 bool is_main_frame,
88 const GURL& url, 88 const GURL& url,
89 PageTransition transition_type, 89 PageTransition transition_type,
90 RenderViewHost* render_view_host) OVERRIDE; 90 RenderViewHost* render_view_host) OVERRIDE;
91 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 91 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
92 92
93 // WebContentsDelegate implementation. 93 // WebContentsDelegate implementation.
94 virtual void RendererUnresponsive(WebContents* source) OVERRIDE; 94 virtual void RendererUnresponsive(WebContents* source) OVERRIDE;
95 95
96 void SetDamageBuffer(TransportDIB* damage_buffer,
97 #if defined(OS_WIN)
98 int damage_buffer_size,
99 #endif
100 const gfx::Size& damage_view_size,
101 float scale_factor);
102
103 void UpdateRect(RenderViewHost* render_view_host, 96 void UpdateRect(RenderViewHost* render_view_host,
104 const ViewHostMsg_UpdateRect_Params& params); 97 const ViewHostMsg_UpdateRect_Params& params);
105 void UpdateRectACK(int message_id, const gfx::Size& size); 98 void UpdateRectACK(int message_id, const gfx::Size& size);
106 // Handles input event routed through the embedder (which is initiated in the 99 // Handles input event routed through the embedder (which is initiated in the
107 // browser plugin (renderer side of the embedder)). 100 // browser plugin (renderer side of the embedder)).
108 void HandleInputEvent(RenderViewHost* render_view_host, 101 void HandleInputEvent(RenderViewHost* render_view_host,
109 const gfx::Rect& guest_rect, 102 const gfx::Rect& guest_rect,
110 const WebKit::WebInputEvent& event, 103 const WebKit::WebInputEvent& event,
111 IPC::Message* reply_message); 104 IPC::Message* reply_message);
112 // Overrides default ShowWidget message so we show them on the correct 105 // Overrides default ShowWidget message so we show them on the correct
(...skipping 10 matching lines...) Expand all
123 WebContents* GetWebContents(); 116 WebContents* GetWebContents();
124 117
125 // Overridden in tests. 118 // Overridden in tests.
126 virtual bool ViewTakeFocus(bool reverse); 119 virtual bool ViewTakeFocus(bool reverse);
127 // Overridden in tests. 120 // Overridden in tests.
128 virtual void SetFocus(bool focused); 121 virtual void SetFocus(bool focused);
129 // Reload the guest. 122 // Reload the guest.
130 virtual void Reload(); 123 virtual void Reload();
131 // Stop loading the guest. 124 // Stop loading the guest.
132 virtual void Stop(); 125 virtual void Stop();
126 // Overridden in tests.
127 virtual void SetDamageBuffer(TransportDIB* damage_buffer,
128 #if defined(OS_WIN)
129 int damage_buffer_size,
130 #endif
131 const gfx::Size& damage_view_size,
132 float scale_factor);
133 133
134 private: 134 private:
135 friend class TestBrowserPluginGuest; 135 friend class TestBrowserPluginGuest;
136 136
137 BrowserPluginGuest(int instance_id, 137 BrowserPluginGuest(int instance_id,
138 WebContentsImpl* web_contents, 138 WebContentsImpl* web_contents,
139 RenderViewHost* render_view_host); 139 RenderViewHost* render_view_host);
140 140
141 RenderProcessHost* embedder_render_process_host() { 141 RenderProcessHost* embedder_render_process_host() {
142 return embedder_render_process_host_; 142 return embedder_render_process_host_;
(...skipping 30 matching lines...) Expand all
173 IDMap<RenderViewHost> pending_updates_; 173 IDMap<RenderViewHost> pending_updates_;
174 int pending_update_counter_; 174 int pending_update_counter_;
175 base::TimeDelta guest_hang_timeout_; 175 base::TimeDelta guest_hang_timeout_;
176 176
177 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 177 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
178 }; 178 };
179 179
180 } // namespace content 180 } // namespace content
181 181
182 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 182 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698