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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 1565013002: Don't send touch events to windows like menus when the touch occurs outside the menu bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore DCHECK Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 DesktopWindowTreeHostWin::~DesktopWindowTreeHostWin() { 91 DesktopWindowTreeHostWin::~DesktopWindowTreeHostWin() {
92 // WARNING: |content_window_| has been destroyed by the time we get here. 92 // WARNING: |content_window_| has been destroyed by the time we get here.
93 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this); 93 desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(this);
94 DestroyDispatcher(); 94 DestroyDispatcher();
95 } 95 }
96 96
97 // static 97 // static
98 aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) { 98 aura::Window* DesktopWindowTreeHostWin::GetContentWindowForHWND(HWND hwnd) {
99 // All HWND's we create should have WindowTreeHost instances associated with
100 // them. There are exceptions like the content layer creating HWND's which
101 // are not associated with WindowTreeHost instances.
99 aura::WindowTreeHost* host = 102 aura::WindowTreeHost* host =
100 aura::WindowTreeHost::GetForAcceleratedWidget(hwnd); 103 aura::WindowTreeHost::GetForAcceleratedWidget(hwnd);
101 return host ? host->window()->GetProperty(kContentWindowForRootWindow) : NULL; 104 return host ? host->window()->GetProperty(kContentWindowForRootWindow) : NULL;
102 } 105 }
103 106
104 // static 107 // static
105 ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) { 108 ui::NativeTheme* DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
106 // Use NativeThemeWin for windows shown on the desktop, those not on the 109 // Use NativeThemeWin for windows shown on the desktop, those not on the
107 // desktop come from Ash and get NativeThemeAura. 110 // desktop come from Ash and get NativeThemeAura.
108 aura::WindowTreeHost* host = window ? window->GetHost() : NULL; 111 aura::WindowTreeHost* host = window ? window->GetHost() : NULL;
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 961
959 // static 962 // static
960 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 963 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
961 internal::NativeWidgetDelegate* native_widget_delegate, 964 internal::NativeWidgetDelegate* native_widget_delegate,
962 DesktopNativeWidgetAura* desktop_native_widget_aura) { 965 DesktopNativeWidgetAura* desktop_native_widget_aura) {
963 return new DesktopWindowTreeHostWin(native_widget_delegate, 966 return new DesktopWindowTreeHostWin(native_widget_delegate,
964 desktop_native_widget_aura); 967 desktop_native_widget_aura);
965 } 968 }
966 969
967 } // namespace views 970 } // namespace views
OLDNEW
« ui/views/controls/menu/menu_controller.cc ('K') | « ui/views/controls/menu/menu_message_loop_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698