OLD | NEW |
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/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 break; | 990 break; |
991 case ui::ET_MOUSE_RELEASED: | 991 case ui::ET_MOUSE_RELEASED: |
992 mouse_pressed_handler_ = NULL; | 992 mouse_pressed_handler_ = NULL; |
993 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & | 993 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & |
994 ~event->changed_button_flags(); | 994 ~event->changed_button_flags(); |
995 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); | 995 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); |
996 break; | 996 break; |
997 default: | 997 default: |
998 break; | 998 break; |
999 } | 999 } |
1000 if (target && target->delegate()) { | 1000 if (target) { |
1001 int flags = event->flags(); | 1001 int flags = event->flags(); |
1002 gfx::Point location_in_window = event->location(); | 1002 gfx::Point location_in_window = event->location(); |
1003 Window::ConvertPointToTarget(this, target, &location_in_window); | 1003 Window::ConvertPointToTarget(this, target, &location_in_window); |
1004 if (IsNonClientLocation(target, location_in_window)) | 1004 if (IsNonClientLocation(target, location_in_window)) |
1005 flags |= ui::EF_IS_NON_CLIENT; | 1005 flags |= ui::EF_IS_NON_CLIENT; |
1006 ui::MouseEvent translated_event( | 1006 ui::MouseEvent translated_event( |
1007 *event, static_cast<Window*>(this), target, event->type(), flags); | 1007 *event, static_cast<Window*>(this), target, event->type(), flags); |
1008 return ProcessMouseEvent(target, &translated_event); | 1008 return ProcessMouseEvent(target, &translated_event); |
1009 } | 1009 } |
1010 return false; | 1010 return false; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 void RootWindow::UnlockCompositor() { | 1057 void RootWindow::UnlockCompositor() { |
1058 DCHECK(compositor_lock_); | 1058 DCHECK(compositor_lock_); |
1059 compositor_lock_ = NULL; | 1059 compositor_lock_ = NULL; |
1060 if (draw_on_compositor_unlock_) { | 1060 if (draw_on_compositor_unlock_) { |
1061 draw_on_compositor_unlock_ = false; | 1061 draw_on_compositor_unlock_ = false; |
1062 ScheduleDraw(); | 1062 ScheduleDraw(); |
1063 } | 1063 } |
1064 } | 1064 } |
1065 | 1065 |
1066 } // namespace aura | 1066 } // namespace aura |
OLD | NEW |