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

Side by Side Diff: ui/views/widget/widget.cc

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 9 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
OLDNEW
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/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 const Widget* toplevel = GetTopLevelWidget(); 765 const Widget* toplevel = GetTopLevelWidget();
766 // If GetTopLevelWidget() returns itself which is not toplevel, 766 // If GetTopLevelWidget() returns itself which is not toplevel,
767 // the widget is detached from toplevel widget. 767 // the widget is detached from toplevel widget.
768 // TODO(oshima): Fix GetTopLevelWidget() to return NULL 768 // TODO(oshima): Fix GetTopLevelWidget() to return NULL
769 // if there is no toplevel. We probably need to add GetTopMostWidget() 769 // if there is no toplevel. We probably need to add GetTopMostWidget()
770 // to replace some use cases. 770 // to replace some use cases.
771 return (toplevel && toplevel != this) ? toplevel->GetInputMethod() : NULL; 771 return (toplevel && toplevel != this) ? toplevel->GetInputMethod() : NULL;
772 } 772 }
773 } 773 }
774 774
775 ui::InputMethod* Widget::GetHostInputMethod() {
776 return native_widget_private()->GetHostInputMethod();
777 }
778
775 void Widget::RunShellDrag(View* view, 779 void Widget::RunShellDrag(View* view,
776 const ui::OSExchangeData& data, 780 const ui::OSExchangeData& data,
777 const gfx::Point& location, 781 const gfx::Point& location,
778 int operation, 782 int operation,
779 ui::DragDropTypes::DragEventSource source) { 783 ui::DragDropTypes::DragEventSource source) {
780 dragged_view_ = view; 784 dragged_view_ = view;
781 native_widget_->RunShellDrag(view, data, location, operation, source); 785 native_widget_->RunShellDrag(view, data, location, operation, source);
782 // If the view is removed during the drag operation, dragged_view_ is set to 786 // If the view is removed during the drag operation, dragged_view_ is set to
783 // NULL. 787 // NULL.
784 if (view && dragged_view_ == view) { 788 if (view && dragged_view_ == view) {
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 1447
1444 //////////////////////////////////////////////////////////////////////////////// 1448 ////////////////////////////////////////////////////////////////////////////////
1445 // internal::NativeWidgetPrivate, NativeWidget implementation: 1449 // internal::NativeWidgetPrivate, NativeWidget implementation:
1446 1450
1447 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1451 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1448 return this; 1452 return this;
1449 } 1453 }
1450 1454
1451 } // namespace internal 1455 } // namespace internal
1452 } // namespace views 1456 } // namespace views
OLDNEW
« ui/views/widget/desktop_aura/x11_desktop_handler.cc ('K') | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698