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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 869563003: [Mac] Allow vibrancy & transparency on WebContentsView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment to [WebContentsViewCocoa allowsVibrancy] Created 5 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
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 130084f31238c5d1c2e5dd174ad349e101d81468..3433daadcb64eaf89572b6d216b06774efda1280 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1708,6 +1708,7 @@ void RenderWidgetHostViewMac::OnDisplayMetricsChanged(
renderWidgetHostView_.reset(r);
canBeKeyView_ = YES;
+ opaque_ = YES;
focusedPluginIdentifier_ = -1;
// OpenGL support:
@@ -1796,6 +1797,10 @@ void RenderWidgetHostViewMac::OnDisplayMetricsChanged(
closeOnDeactivate_ = b;
}
+- (void)setOpaque:(BOOL)opaque {
+ opaque_ = opaque;
+}
+
- (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
NSWindow* window = [self window];
// If this is a background window, don't handle mouse movement events. This
@@ -3367,7 +3372,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName;
}
- (BOOL)isOpaque {
- return YES;
+ return opaque_;
}
// "-webkit-app-region: drag | no-drag" is implemented on Mac by excluding
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/browser/web_contents/web_contents_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698