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

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

Issue 11554030: <webview>: Add name attribute (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added tests Created 8 years 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void set_embedder_web_contents(WebContentsImpl* web_contents) { 94 void set_embedder_web_contents(WebContentsImpl* web_contents) {
95 embedder_web_contents_ = web_contents; 95 embedder_web_contents_ = web_contents;
96 } 96 }
97 WebContentsImpl* embedder_web_contents() const { 97 WebContentsImpl* embedder_web_contents() const {
98 return embedder_web_contents_; 98 return embedder_web_contents_;
99 } 99 }
100 100
101 bool focused() const { return focused_; } 101 bool focused() const { return focused_; }
102 bool visible() const { return visible_; } 102 bool visible() const { return visible_; }
103 103
104 // Sets the name of the guest so that other guests of the same partition can
105 // access it.
106 void SetName(const std::string& name);
107
108 // Notifies the embedder that the frame of a guest has updated its name.
109 void UpdateFrameName(int frame_id,
110 bool is_top_level,
111 const std::string& name);
112
104 // NotificationObserver implementation. 113 // NotificationObserver implementation.
105 virtual void Observe(int type, 114 virtual void Observe(int type,
106 const NotificationSource& source, 115 const NotificationSource& source,
107 const NotificationDetails& details) OVERRIDE; 116 const NotificationDetails& details) OVERRIDE;
108 117
109 // WebContentsObserver implementation. 118 // WebContentsObserver implementation.
110 virtual void DidStartProvisionalLoadForFrame( 119 virtual void DidStartProvisionalLoadForFrame(
111 int64 frame_id, 120 int64 frame_id,
112 int64 parent_frame_id, 121 int64 parent_frame_id,
113 bool is_main_frame, 122 bool is_main_frame,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 #endif 310 #endif
302 gfx::Size damage_view_size_; 311 gfx::Size damage_view_size_;
303 float damage_buffer_scale_factor_; 312 float damage_buffer_scale_factor_;
304 gfx::Rect guest_window_rect_; 313 gfx::Rect guest_window_rect_;
305 gfx::Rect guest_screen_rect_; 314 gfx::Rect guest_screen_rect_;
306 IDMap<RenderViewHost> pending_updates_; 315 IDMap<RenderViewHost> pending_updates_;
307 int pending_update_counter_; 316 int pending_update_counter_;
308 base::TimeDelta guest_hang_timeout_; 317 base::TimeDelta guest_hang_timeout_;
309 bool focused_; 318 bool focused_;
310 bool visible_; 319 bool visible_;
320 std::string name_;
311 bool auto_size_enabled_; 321 bool auto_size_enabled_;
312 gfx::Size max_auto_size_; 322 gfx::Size max_auto_size_;
313 gfx::Size min_auto_size_; 323 gfx::Size min_auto_size_;
314 324
315 // Hardware Accelerated Surface Params 325 // Hardware Accelerated Surface Params
316 gfx::GLSurfaceHandle surface_handle_; 326 gfx::GLSurfaceHandle surface_handle_;
317 327
318 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest); 328 DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuest);
319 }; 329 };
320 330
321 } // namespace content 331 } // namespace content
322 332
323 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_ 333 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698