Chromium Code Reviews

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

Issue 869563003: [Mac] Allow vibrancy & transparency on WebContentsView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.h ('k') | no next file » | 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 27989c3951ffce334f0a2f48c2db99b67f3695df..24bce2c586bf4fbd1ba8917993ceee1d1cc09a84 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -423,6 +423,10 @@ void WebContentsViewMac::CloseTab() {
[super dealloc];
}
+- (BOOL)allowsVibrancy {
+ return YES;
Alexei Svitkine (slow) 2015/01/22 16:41:21 What's the effect of returning YES here? Does it
joleksy 2015/01/23 07:24:01 By itself it does not change anything, from the do
+}
+
// Registers for the view for the appropriate drag types.
- (void)registerDragTypes {
NSArray* types = [NSArray arrayWithObjects:
@@ -479,6 +483,13 @@ void WebContentsViewMac::CloseTab() {
return mouseDownCanMoveWindow_;
}
+- (void)setOpaque:(BOOL)opaque {
+ RenderWidgetHostViewMac* view = static_cast<RenderWidgetHostViewMac*>(
+ webContentsView_->web_contents()->GetRenderWidgetHostView());
+ DCHECK(view);
+ [view->cocoa_view() setOpaque:opaque];
+}
+
- (void)pasteboard:(NSPasteboard*)sender provideDataForType:(NSString*)type {
[dragSource_ lazyWriteToPasteboard:sender
forType:type];
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine