diff options
author | jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 19:07:26 +0000 |
---|---|---|
committer | jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 19:07:26 +0000 |
commit | 65a8692322883bd4b46d6ee48c45626ca587aa59 (patch) | |
tree | b74d2d62de27eeff132c7c7bf8006ff421bff869 | |
parent | b7c6770935565c76319fa500eb912fd739dd67b1 (diff) | |
download | chromium_src-65a8692322883bd4b46d6ee48c45626ca587aa59.zip chromium_src-65a8692322883bd4b46d6ee48c45626ca587aa59.tar.gz chromium_src-65a8692322883bd4b46d6ee48c45626ca587aa59.tar.bz2 |
Make the screenshare notification window 85% opaque.
This is to avoid users using the window for hiding sensitive contents that they don't want to share.
See https://code.google.com/p/webrtc/issues/detail?id=2789#c36
BUG=https://code.google.com/p/webrtc/issues/detail?id=2789
Review URL: https://codereview.chromium.org/215363003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260224 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/screen_capture_notification_ui_views.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm b/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm index 2f14f62..0071c14 100644 --- a/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm +++ b/chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.mm @@ -32,6 +32,7 @@ const CGFloat kHorizontalMargin = 10; const CGFloat kPadding = 5; const CGFloat kPaddingLeft = 10; const CGFloat kWindowCornerRadius = 2; +const CGFloat kWindowAlphaValue = 0.85; @interface ScreenCaptureNotificationController() - (void)hide; @@ -80,6 +81,7 @@ scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create( backing:NSBackingStoreBuffered defer:NO]); [window setReleasedWhenClosed:NO]; + [window setAlphaValue:kWindowAlphaValue]; [window setBackgroundColor:[NSColor clearColor]]; [window setOpaque:NO]; [window setHasShadow:YES]; diff --git a/chrome/browser/ui/views/screen_capture_notification_ui_views.cc b/chrome/browser/ui/views/screen_capture_notification_ui_views.cc index 280d4fa..d101cc2 100644 --- a/chrome/browser/ui/views/screen_capture_notification_ui_views.cc +++ b/chrome/browser/ui/views/screen_capture_notification_ui_views.cc @@ -35,6 +35,7 @@ const int kMaximumWidth = 1000; const int kHorizontalMargin = 10; const int kPadding = 5; const int kPaddingLeft = 10; +const float kWindowAlphaValue = 0.85f; namespace { @@ -207,7 +208,7 @@ gfx::NativeViewId ScreenCaptureNotificationUIViews::OnStarted( work_area.y() + work_area.height() - size.height(), size.width(), size.height()); widget->SetBounds(bounds); - + widget->SetOpacity(0xFF * kWindowAlphaValue); widget->Show(); #if defined(OS_WIN) |