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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 12026029: Allow TabCapture to capture full screen flash widgets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 07231f6472a0b739ac1c79f5aecb13943a350825..15032102a75bac471a2c03e8812cd26506206e27 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -318,7 +318,8 @@ WebContentsImpl::WebContentsImpl(
maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)),
temporary_zoom_settings_(false),
content_restrictions_(0),
- color_chooser_(NULL) {
+ color_chooser_(NULL),
+ fullscreen_widget_routing_id_(MSG_ROUTING_NONE) {
}
WebContentsImpl::~WebContentsImpl() {
@@ -835,6 +836,10 @@ int WebContentsImpl::GetRoutingID() const {
return GetRenderViewHost()->GetRoutingID();
}
+int WebContentsImpl::GetFullscreenWidgetRoutingID() const {
+ return fullscreen_widget_routing_id_;
+}
+
RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const {
return render_manager_.GetRenderWidgetHostView();
}
@@ -1246,6 +1251,15 @@ void WebContentsImpl::RenderWidgetDeleted(
created_widgets_.find(render_widget_host);
if (iter != created_widgets_.end())
created_widgets_.erase(iter);
+
+ if (render_widget_host &&
+ render_widget_host->GetRoutingID() == fullscreen_widget_routing_id_) {
+ FOR_EACH_OBSERVER(WebContentsObserver,
+ observers_,
+ DidDestroyFullscreenWidget(
+ fullscreen_widget_routing_id_));
+ fullscreen_widget_routing_id_ = MSG_ROUTING_NONE;
+ }
}
bool WebContentsImpl::PreHandleKeyboardEvent(
@@ -1454,6 +1468,12 @@ void WebContentsImpl::ShowCreatedWidget(int route_id,
void WebContentsImpl::ShowCreatedFullscreenWidget(int route_id) {
ShowCreatedWidget(route_id, true, gfx::Rect());
+
+ DCHECK_EQ(MSG_ROUTING_NONE, fullscreen_widget_routing_id_);
+ fullscreen_widget_routing_id_ = route_id;
+ FOR_EACH_OBSERVER(WebContentsObserver,
+ observers_,
+ DidShowFullscreenWidget(route_id));
}
void WebContentsImpl::ShowCreatedWidget(int route_id,
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698