| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 | 839 |
| 840 bool View::OnMouseWheel(const MouseWheelEvent& event) { | 840 bool View::OnMouseWheel(const MouseWheelEvent& event) { |
| 841 return false; | 841 return false; |
| 842 } | 842 } |
| 843 | 843 |
| 844 TextInputClient* View::GetTextInputClient() { | 844 TextInputClient* View::GetTextInputClient() { |
| 845 return NULL; | 845 return NULL; |
| 846 } | 846 } |
| 847 | 847 |
| 848 InputMethod* View::GetInputMethod() { | 848 InputMethod* View::GetInputMethod() { |
| 849 NOTIMPLEMENTED(); | 849 Widget* widget = GetWidget(); |
| 850 return NULL; | 850 return widget ? widget->GetInputMethod() : NULL; |
| 851 } | 851 } |
| 852 | 852 |
| 853 // Accelerators ---------------------------------------------------------------- | 853 // Accelerators ---------------------------------------------------------------- |
| 854 | 854 |
| 855 void View::AddAccelerator(const Accelerator& accelerator) { | 855 void View::AddAccelerator(const Accelerator& accelerator) { |
| 856 if (!accelerators_.get()) | 856 if (!accelerators_.get()) |
| 857 accelerators_.reset(new std::vector<Accelerator>()); | 857 accelerators_.reset(new std::vector<Accelerator>()); |
| 858 | 858 |
| 859 std::vector<Accelerator>::iterator iter = | 859 std::vector<Accelerator>::iterator iter = |
| 860 std::find(accelerators_->begin(), accelerators_->end(), accelerator); | 860 std::find(accelerators_->begin(), accelerators_->end(), accelerator); |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1731 | 1731 |
| 1732 OSExchangeData data; | 1732 OSExchangeData data; |
| 1733 WriteDragData(press_pt, &data); | 1733 WriteDragData(press_pt, &data); |
| 1734 | 1734 |
| 1735 // Message the RootView to do the drag and drop. That way if we're removed | 1735 // Message the RootView to do the drag and drop. That way if we're removed |
| 1736 // the RootView can detect it and avoid calling us back. | 1736 // the RootView can detect it and avoid calling us back. |
| 1737 GetWidget()->RunShellDrag(this, data, drag_operations); | 1737 GetWidget()->RunShellDrag(this, data, drag_operations); |
| 1738 } | 1738 } |
| 1739 | 1739 |
| 1740 } // namespace views | 1740 } // namespace views |
| OLD | NEW |