| 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/views/controls/button/menu_button.h" | 5 #include "ui/views/controls/button/menu_button.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "ui/accessibility/ax_view_state.h" | 8 #include "ui/accessibility/ax_view_state.h" |
| 9 #include "ui/base/dragdrop/drag_drop_types.h" | 9 #include "ui/base/dragdrop/drag_drop_types.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 return false; | 143 return false; |
| 144 } | 144 } |
| 145 | 145 |
| 146 increment_pressed_lock_called_ = nullptr; | 146 increment_pressed_lock_called_ = nullptr; |
| 147 destroyed_flag_ = nullptr; | 147 destroyed_flag_ = nullptr; |
| 148 | 148 |
| 149 menu_closed_time_ = TimeTicks::Now(); | 149 menu_closed_time_ = TimeTicks::Now(); |
| 150 | 150 |
| 151 if (ink_drop_delegate() && !increment_pressed_lock_called && | 151 if (ink_drop_delegate() && !increment_pressed_lock_called && |
| 152 pressed_lock_count_ == 0) { | 152 pressed_lock_count_ == 0) { |
| 153 ink_drop_delegate()->OnAction(InkDropState::QUICK_ACTION); | 153 ink_drop_delegate()->OnAction(InkDropState::ACTION_TRIGGERED); |
| 154 } | 154 } |
| 155 | 155 |
| 156 // We must return false here so that the RootView does not get stuck | 156 // We must return false here so that the RootView does not get stuck |
| 157 // sending all mouse pressed events to us instead of the appropriate | 157 // sending all mouse pressed events to us instead of the appropriate |
| 158 // target. | 158 // target. |
| 159 return false; | 159 return false; |
| 160 } | 160 } |
| 161 | 161 |
| 162 if (ink_drop_delegate()) | 162 if (ink_drop_delegate()) |
| 163 ink_drop_delegate()->OnAction(InkDropState::HIDDEN); | 163 ink_drop_delegate()->OnAction(InkDropState::HIDDEN); |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 if (!GetWidget()) { | 409 if (!GetWidget()) { |
| 410 NOTREACHED(); | 410 NOTREACHED(); |
| 411 return 0; | 411 return 0; |
| 412 } | 412 } |
| 413 | 413 |
| 414 gfx::Rect monitor_bounds = GetWidget()->GetWorkAreaBoundsInScreen(); | 414 gfx::Rect monitor_bounds = GetWidget()->GetWorkAreaBoundsInScreen(); |
| 415 return monitor_bounds.right() - 1; | 415 return monitor_bounds.right() - 1; |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace views | 418 } // namespace views |
| OLD | NEW |