| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/view.h" | 5 #include "views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 // we should de-register from that focus manager now. | 841 // we should de-register from that focus manager now. |
| 842 if (GetWidget() && accelerator_focus_manager_) | 842 if (GetWidget() && accelerator_focus_manager_) |
| 843 accelerator_focus_manager_->UnregisterAccelerator(accelerator, this); | 843 accelerator_focus_manager_->UnregisterAccelerator(accelerator, this); |
| 844 } | 844 } |
| 845 | 845 |
| 846 void View::ResetAccelerators() { | 846 void View::ResetAccelerators() { |
| 847 if (accelerators_.get()) | 847 if (accelerators_.get()) |
| 848 UnregisterAccelerators(false); | 848 UnregisterAccelerators(false); |
| 849 } | 849 } |
| 850 | 850 |
| 851 bool View::AcceleratorPressed(const Accelerator& accelerator) { | 851 bool View::AcceleratorPressed(const ui::Accelerator& accelerator) { |
| 852 return false; | 852 return false; |
| 853 } | 853 } |
| 854 | 854 |
| 855 // Focus ----------------------------------------------------------------------- | 855 // Focus ----------------------------------------------------------------------- |
| 856 | 856 |
| 857 bool View::HasFocus() const { | 857 bool View::HasFocus() const { |
| 858 const FocusManager* focus_manager = GetFocusManager(); | 858 const FocusManager* focus_manager = GetFocusManager(); |
| 859 return focus_manager && (focus_manager->GetFocusedView() == this); | 859 return focus_manager && (focus_manager->GetFocusedView() == this); |
| 860 } | 860 } |
| 861 | 861 |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 | 2067 |
| 2068 OSExchangeData data; | 2068 OSExchangeData data; |
| 2069 WriteDragData(press_pt, &data); | 2069 WriteDragData(press_pt, &data); |
| 2070 | 2070 |
| 2071 // Message the RootView to do the drag and drop. That way if we're removed | 2071 // Message the RootView to do the drag and drop. That way if we're removed |
| 2072 // the RootView can detect it and avoid calling us back. | 2072 // the RootView can detect it and avoid calling us back. |
| 2073 GetWidget()->RunShellDrag(this, data, drag_operations); | 2073 GetWidget()->RunShellDrag(this, data, drag_operations); |
| 2074 } | 2074 } |
| 2075 | 2075 |
| 2076 } // namespace views | 2076 } // namespace views |
| OLD | NEW |