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/widget/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 } | 209 } |
210 | 210 |
211 void clear_got_gesture_event() { | 211 void clear_got_gesture_event() { |
212 got_gesture_event_ = false; | 212 got_gesture_event_ = false; |
213 } | 213 } |
214 bool got_gesture_event() const { | 214 bool got_gesture_event() const { |
215 return got_gesture_event_; | 215 return got_gesture_event_; |
216 } | 216 } |
217 | 217 |
218 // View overrides: | 218 // View overrides: |
219 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE { | 219 virtual ui::GestureStatus OnGestureEvent( |
| 220 const ui::GestureEvent& event) OVERRIDE { |
220 got_gesture_event_ = true; | 221 got_gesture_event_ = true; |
221 return consume_gesture_event_ ? ui::GESTURE_STATUS_CONSUMED : | 222 return consume_gesture_event_ ? ui::GESTURE_STATUS_CONSUMED : |
222 ui::GESTURE_STATUS_UNKNOWN; | 223 ui::GESTURE_STATUS_UNKNOWN; |
223 } | 224 } |
224 | 225 |
225 private: | 226 private: |
226 // Was OnGestureEvent() invoked? | 227 // Was OnGestureEvent() invoked? |
227 bool got_gesture_event_; | 228 bool got_gesture_event_; |
228 | 229 |
229 // Dictates what OnGestureEvent() returns. | 230 // Dictates what OnGestureEvent() returns. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 parent->GetNativeWindow()->GetEventHandlerForPoint( | 367 parent->GetNativeWindow()->GetEventHandlerForPoint( |
367 gfx::Point(20, 20))); | 368 gfx::Point(20, 20))); |
368 | 369 |
369 // Work around for bug in NativeWidgetAura. | 370 // Work around for bug in NativeWidgetAura. |
370 // TODO: fix bug and remove this. | 371 // TODO: fix bug and remove this. |
371 parent->Close(); | 372 parent->Close(); |
372 } | 373 } |
373 | 374 |
374 } // namespace | 375 } // namespace |
375 } // namespace views | 376 } // namespace views |
OLD | NEW |