Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: views/view.cc

Issue 6675005: Integrate the new input method API for Views into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/focus/focus_manager.cc ('k') | views/widget/native_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « views/focus/focus_manager.cc ('k') | views/widget/native_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698