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

Unified Diff: content/browser/web_contents/web_contents_view_mac.mm

Issue 11418244: Order the GL overlays above windows if possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: oops, null check Created 8 years, 1 month 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_view_mac.h ('k') | content/public/browser/web_contents_view.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_view_mac.mm
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 777cc270632f8b02dc245e13a2c2476325f4c117..8d5968015422e885f18e86c6b52c6dc7e665a8f9 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -79,7 +79,8 @@ WebContentsView* CreateWebContentsView(
WebContentsViewMac::WebContentsViewMac(WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate)
: web_contents_(web_contents),
- delegate_(delegate) {
+ delegate_(delegate),
+ allow_overlapping_views_(false) {
}
WebContentsViewMac::~WebContentsViewMac() {
@@ -116,6 +117,7 @@ RenderWidgetHostView* WebContentsViewMac::CreateViewForWidget(
delegate()->CreateRenderWidgetHostViewDelegate(render_widget_host);
view->SetDelegate(rw_delegate);
}
+ view->SetAllowOverlappingViews(allow_overlapping_views_);
// Fancy layout comes later; for now just make it our size and resize it
// with us. In case there are other siblings of the content area, we want
@@ -334,6 +336,17 @@ gfx::Rect WebContentsViewMac::GetViewBounds() const {
return gfx::Rect();
}
+void WebContentsViewMac::SetAllowOverlappingViews(bool overlapping) {
+ if (allow_overlapping_views_ == overlapping)
+ return;
+
+ allow_overlapping_views_ = overlapping;
+ RenderWidgetHostViewMac* view = static_cast<RenderWidgetHostViewMac*>(
+ web_contents_->GetRenderWidgetHostView());
+ if (view)
+ view->SetAllowOverlappingViews(allow_overlapping_views_);
+}
+
void WebContentsViewMac::CloseTab() {
web_contents_->Close(web_contents_->GetRenderViewHost());
}
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.h ('k') | content/public/browser/web_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698