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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc

Issue 952103002: Use Widget::InitParams::shadow_type instead of calling wm::SetShadowType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
index cf3624ec8db86604ad71f67e390a75edb7fd5f35..440274f4bb2ba8b2e32f501599a2d5f8610d8dba 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
@@ -28,7 +28,6 @@
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/easy_resize_window_targeter.h"
-#include "ui/wm/core/shadow_types.h"
#if defined(OS_LINUX)
#include "chrome/browser/shell_integration_linux.h"
@@ -217,8 +216,16 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow(
init_params.delegate = this;
init_params.remove_standard_frame = IsFrameless() || has_frame_color_;
init_params.use_system_default_icon = true;
- if (create_params.alpha_enabled)
+ if (create_params.alpha_enabled) {
init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
+
+ // The given window is most likely not rectangular since it uses
+ // transparency and has no standard frame, don't show a shadow for it.
+ // TODO(skuhne): If we run into an application which should have a shadow
+ // but does not have, a new attribute has to be added.
+ if (IsFrameless())
+ init_params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE;
+ }
init_params.keep_on_top = create_params.always_on_top;
init_params.visible_on_all_workspaces =
create_params.visible_on_all_workspaces;
@@ -260,15 +267,6 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow(
widget()->SetBounds(window_bounds);
}
- if (IsFrameless() &&
- init_params.opacity == views::Widget::InitParams::TRANSLUCENT_WINDOW) {
- // The given window is most likely not rectangular since it uses
- // transparency and has no standard frame, don't show a shadow for it.
- // TODO(skuhne): If we run into an application which should have a shadow
- // but does not have, a new attribute has to be added.
- wm::SetShadowType(widget()->GetNativeWindow(), wm::SHADOW_TYPE_NONE);
- }
-
#if defined(OS_CHROMEOS)
if (create_params.is_ime_window)
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698