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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate_aura.cc

Issue 1456963002: Make browser windows override_redirect when dragging tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make browser windows override_redirect when dragging tabs. Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include "chrome/browser/ui/ash/ash_util.h" 7 #include "chrome/browser/ui/ash/ash_util.h"
8 8
9 views::Widget::InitParams::WindowOpacity 9 views::Widget::InitParams::WindowOpacity
10 ChromeViewsDelegate::GetOpacityForInitParams( 10 ChromeViewsDelegate::GetOpacityForInitParams(
11 const views::Widget::InitParams& params) { 11 const views::Widget::InitParams& params) {
12 gfx::NativeView native_view = params.parent ? params.parent : params.context; 12 gfx::NativeView native_view = params.parent ? params.parent : params.context;
13 if (native_view && chrome::IsNativeViewInAsh(native_view)) 13 if (native_view && chrome::IsNativeViewInAsh(native_view))
14 return views::Widget::InitParams::TRANSLUCENT_WINDOW; 14 return views::Widget::InitParams::TRANSLUCENT_WINDOW;
15 15
16 // We want translucent windows when either we are in ASH or we are 16 // We want translucent windows when either we are in ASH or we are
17 // a top level window which is not of type TYPE_WINDOW. 17 // a top level window which is not of type TYPE_WINDOW.
18 if (!params.child && params.type != views::Widget::InitParams::TYPE_WINDOW) 18 if (!params.child &&
19 (params.type != views::Widget::InitParams::TYPE_WINDOW ||
Daniel Erat 2015/12/28 21:33:02 did you mean '&&' here? "foo != A || foo != B" wil
stapelberg 2016/01/18 17:22:23 Yes. In the new patchset that hunk’s no longer pre
20 params.type != views::Widget::InitParams::TYPE_DRAG_BROWSER))
19 return views::Widget::InitParams::TRANSLUCENT_WINDOW; 21 return views::Widget::InitParams::TRANSLUCENT_WINDOW;
20 22
21 return views::Widget::InitParams::OPAQUE_WINDOW; 23 return views::Widget::InitParams::OPAQUE_WINDOW;
22 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698