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

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

Issue 11066032: Browser Plugin: Update Guest WebContents Visibility on BrowserPlugin Visiblity Change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits 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
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 BrowserPluginEmbedder has a list of guests it manages. 5 // A BrowserPluginEmbedder has a list of guests it manages.
6 // In the beginning when a renderer sees one or more guests (BrowserPlugin 6 // In the beginning when a renderer sees one or more guests (BrowserPlugin
7 // instance(s)) and there is a request to navigate to them, the WebContents for 7 // instance(s)) and there is a request to navigate to them, the WebContents for
8 // that renderer creates a BrowserPluginEmbedder for itself. The 8 // that renderer creates a BrowserPluginEmbedder for itself. The
9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one 9 // BrowserPluginEmbedder, in turn, manages a set of BrowserPluginGuests -- one
10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that 10 // BrowserPluginGuest for each guest in the embedding WebContents. Note that
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void UpdateRectACK(int instance_id, int message_id, const gfx::Size& size); 98 void UpdateRectACK(int instance_id, int message_id, const gfx::Size& size);
99 void SetFocus(int instance_id, bool focused); 99 void SetFocus(int instance_id, bool focused);
100 // Handles input events sent from the BrowserPlugin (embedder's renderer 100 // Handles input events sent from the BrowserPlugin (embedder's renderer
101 // process) by passing them to appropriate guest's input handler. 101 // process) by passing them to appropriate guest's input handler.
102 void HandleInputEvent(int instance_id, 102 void HandleInputEvent(int instance_id,
103 RenderViewHost* render_view_host, 103 RenderViewHost* render_view_host,
104 const gfx::Rect& guest_rect, 104 const gfx::Rect& guest_rect,
105 const WebKit::WebInputEvent& event, 105 const WebKit::WebInputEvent& event,
106 IPC::Message* reply_message); 106 IPC::Message* reply_message);
107 void PluginDestroyed(int instance_id); 107 void PluginDestroyed(int instance_id);
108 void SetGuestVisibility(int instance_id,
109 bool guest_visible);
108 110
109 // Overrides factory for testing. Default (NULL) value indicates regular 111 // Overrides factory for testing. Default (NULL) value indicates regular
110 // (non-test) environment. 112 // (non-test) environment.
111 static void set_factory_for_testing(BrowserPluginHostFactory* factory) { 113 static void set_factory_for_testing(BrowserPluginHostFactory* factory) {
112 factory_ = factory; 114 factory_ = factory;
113 } 115 }
114 116
115 private: 117 private:
116 friend class TestBrowserPluginEmbedder; 118 friend class TestBrowserPluginEmbedder;
117 119
(...skipping 19 matching lines...) Expand all
137 139
138 // Static factory instance (always NULL for non-test). 140 // Static factory instance (always NULL for non-test).
139 static BrowserPluginHostFactory* factory_; 141 static BrowserPluginHostFactory* factory_;
140 142
141 // A scoped container for notification registries. 143 // A scoped container for notification registries.
142 NotificationRegistrar registrar_; 144 NotificationRegistrar registrar_;
143 145
144 // Contains guests' WebContents, mapping from their instance ids. 146 // Contains guests' WebContents, mapping from their instance ids.
145 ContainerInstanceMap guest_web_contents_by_instance_id_; 147 ContainerInstanceMap guest_web_contents_by_instance_id_;
146 RenderViewHost* render_view_host_; 148 RenderViewHost* render_view_host_;
149 bool visible_;
147 150
148 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder); 151 DISALLOW_COPY_AND_ASSIGN(BrowserPluginEmbedder);
149 }; 152 };
150 153
151 } // namespace content 154 } // namespace content
152 155
153 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_ 156 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_EMBEDDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_plugin/browser_plugin_embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698