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

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

Issue 375593002: Do not set the mouse event handler if Widget::SetCapture() fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 return GetWidget()->widget_delegate() && 678 return GetWidget()->widget_delegate() &&
679 GetWidget()->widget_delegate()->ExecuteWindowsCommand(command); 679 GetWidget()->widget_delegate()->ExecuteWindowsCommand(command);
680 } 680 }
681 681
682 void DesktopWindowTreeHostWin::HandleCancelMode() { 682 void DesktopWindowTreeHostWin::HandleCancelMode() {
683 dispatcher()->DispatchCancelModeEvent(); 683 dispatcher()->DispatchCancelModeEvent();
684 } 684 }
685 685
686 void DesktopWindowTreeHostWin::HandleCaptureLost() { 686 void DesktopWindowTreeHostWin::HandleCaptureLost() {
687 OnHostLostWindowCapture(); 687 OnHostLostWindowCapture();
688 native_widget_delegate_->OnMouseCaptureLost();
689 } 688 }
690 689
691 void DesktopWindowTreeHostWin::HandleClose() { 690 void DesktopWindowTreeHostWin::HandleClose() {
692 GetWidget()->Close(); 691 GetWidget()->Close();
693 } 692 }
694 693
695 bool DesktopWindowTreeHostWin::HandleCommand(int command) { 694 bool DesktopWindowTreeHostWin::HandleCommand(int command) {
696 return GetWidget()->widget_delegate()->ExecuteWindowsCommand(command); 695 return GetWidget()->widget_delegate()->ExecuteWindowsCommand(command);
697 } 696 }
698 697
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 942
944 // static 943 // static
945 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 944 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
946 internal::NativeWidgetDelegate* native_widget_delegate, 945 internal::NativeWidgetDelegate* native_widget_delegate,
947 DesktopNativeWidgetAura* desktop_native_widget_aura) { 946 DesktopNativeWidgetAura* desktop_native_widget_aura) {
948 return new DesktopWindowTreeHostWin(native_widget_delegate, 947 return new DesktopWindowTreeHostWin(native_widget_delegate,
949 desktop_native_widget_aura); 948 desktop_native_widget_aura);
950 } 949 }
951 950
952 } // namespace views 951 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698