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

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

Issue 246073009: Refreshes the caret bounds on window move for IME UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | 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) 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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 gfx::Size Widget::GetMinimumSize() { 1081 gfx::Size Widget::GetMinimumSize() {
1082 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size(); 1082 return non_client_view_ ? non_client_view_->GetMinimumSize() : gfx::Size();
1083 } 1083 }
1084 1084
1085 gfx::Size Widget::GetMaximumSize() { 1085 gfx::Size Widget::GetMaximumSize() {
1086 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); 1086 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size();
1087 } 1087 }
1088 1088
1089 void Widget::OnNativeWidgetMove() { 1089 void Widget::OnNativeWidgetMove() {
1090 widget_delegate_->OnWidgetMove(); 1090 widget_delegate_->OnWidgetMove();
1091 View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView();
1092 if (focused_view && focused_view->GetInputMethod())
1093 focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view);
1091 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged( 1094 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged(
1092 this, 1095 this,
1093 GetWindowBoundsInScreen())); 1096 GetWindowBoundsInScreen()));
1094 } 1097 }
1095 1098
1096 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) { 1099 void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) {
1097 root_view_->SetSize(new_size); 1100 root_view_->SetSize(new_size);
1098 1101
oshima 2014/04/23 05:55:44 You may also want to update when the size is chang
Jun Mukai 2014/04/23 22:23:04 I don't think so, each view can update the boundar
oshima 2014/04/23 22:54:15 Are you sure it gets called when only parent bound
Jun Mukai 2014/04/23 23:16:02 Sorry, I got unsure about your point. The widget s
Jun Mukai 2014/04/23 23:26:48 chatted offline and I was wrong. There could be a
1099 // Size changed notifications can fire prior to full initialization 1102 // Size changed notifications can fire prior to full initialization
1100 // i.e. during session restore. Avoid saving session state during these 1103 // i.e. during session restore. Avoid saving session state during these
1101 // startup procedures. 1104 // startup procedures.
1102 if (native_widget_initialized_) 1105 if (native_widget_initialized_)
1103 SaveWindowPlacement(); 1106 SaveWindowPlacement();
1104 1107
1105 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged( 1108 FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged(
1106 this, 1109 this,
1107 GetWindowBoundsInScreen())); 1110 GetWindowBoundsInScreen()));
1108 } 1111 }
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 1466
1464 //////////////////////////////////////////////////////////////////////////////// 1467 ////////////////////////////////////////////////////////////////////////////////
1465 // internal::NativeWidgetPrivate, NativeWidget implementation: 1468 // internal::NativeWidgetPrivate, NativeWidget implementation:
1466 1469
1467 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1470 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1468 return this; 1471 return this;
1469 } 1472 }
1470 1473
1471 } // namespace internal 1474 } // namespace internal
1472 } // namespace views 1475 } // namespace views
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698