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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 23445020: Support inputmode attribute for Windows Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unused include Created 7 years, 3 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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 640
641 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host) 641 RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
642 : host_(RenderWidgetHostImpl::From(host)), 642 : host_(RenderWidgetHostImpl::From(host)),
643 window_(new aura::Window(this)), 643 window_(new aura::Window(this)),
644 in_shutdown_(false), 644 in_shutdown_(false),
645 is_fullscreen_(false), 645 is_fullscreen_(false),
646 popup_parent_host_view_(NULL), 646 popup_parent_host_view_(NULL),
647 popup_child_host_view_(NULL), 647 popup_child_host_view_(NULL),
648 is_loading_(false), 648 is_loading_(false),
649 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), 649 text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
650 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT),
650 can_compose_inline_(true), 651 can_compose_inline_(true),
651 has_composition_text_(false), 652 has_composition_text_(false),
652 last_swapped_surface_scale_factor_(1.f), 653 last_swapped_surface_scale_factor_(1.f),
653 paint_canvas_(NULL), 654 paint_canvas_(NULL),
654 synthetic_move_sent_(false), 655 synthetic_move_sent_(false),
655 accelerated_compositing_state_changed_(false), 656 accelerated_compositing_state_changed_(false),
656 can_lock_compositor_(YES), 657 can_lock_compositor_(YES),
657 cursor_visibility_state_in_renderer_(UNKNOWN), 658 cursor_visibility_state_in_renderer_(UNKNOWN),
658 paint_observer_(NULL), 659 paint_observer_(NULL),
659 touch_editing_client_(NULL) { 660 touch_editing_client_(NULL) {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 paint_observer_->OnPageLoadComplete(); 1037 paint_observer_->OnPageLoadComplete();
1037 is_loading_ = is_loading; 1038 is_loading_ = is_loading;
1038 UpdateCursorIfOverSelf(); 1039 UpdateCursorIfOverSelf();
1039 } 1040 }
1040 1041
1041 void RenderWidgetHostViewAura::TextInputTypeChanged( 1042 void RenderWidgetHostViewAura::TextInputTypeChanged(
1042 ui::TextInputType type, 1043 ui::TextInputType type,
1043 bool can_compose_inline, 1044 bool can_compose_inline,
1044 ui::TextInputMode input_mode) { 1045 ui::TextInputMode input_mode) {
1045 if (text_input_type_ != type || 1046 if (text_input_type_ != type ||
1047 text_input_mode_ != input_mode ||
1046 can_compose_inline_ != can_compose_inline) { 1048 can_compose_inline_ != can_compose_inline) {
1047 text_input_type_ = type; 1049 text_input_type_ = type;
1050 text_input_mode_ = input_mode;
1048 can_compose_inline_ = can_compose_inline; 1051 can_compose_inline_ = can_compose_inline;
1049 if (GetInputMethod()) 1052 if (GetInputMethod())
1050 GetInputMethod()->OnTextInputTypeChanged(this); 1053 GetInputMethod()->OnTextInputTypeChanged(this);
1051 if (touch_editing_client_) 1054 if (touch_editing_client_)
1052 touch_editing_client_->OnTextInputTypeChanged(text_input_type_); 1055 touch_editing_client_->OnTextInputTypeChanged(text_input_type_);
1053 } 1056 }
1054 } 1057 }
1055 1058
1056 void RenderWidgetHostViewAura::ImeCancelComposition() { 1059 void RenderWidgetHostViewAura::ImeCancelComposition() {
1057 if (GetInputMethod()) 1060 if (GetInputMethod())
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2180
2178 gfx::NativeWindow RenderWidgetHostViewAura::GetAttachedWindow() const { 2181 gfx::NativeWindow RenderWidgetHostViewAura::GetAttachedWindow() const {
2179 return window_; 2182 return window_;
2180 } 2183 }
2181 2184
2182 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const { 2185 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const {
2183 return text_input_type_; 2186 return text_input_type_;
2184 } 2187 }
2185 2188
2186 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const { 2189 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const {
2187 return ui::TEXT_INPUT_MODE_DEFAULT; 2190 return text_input_mode_;
2188 } 2191 }
2189 2192
2190 bool RenderWidgetHostViewAura::CanComposeInline() const { 2193 bool RenderWidgetHostViewAura::CanComposeInline() const {
2191 return can_compose_inline_; 2194 return can_compose_inline_;
2192 } 2195 }
2193 2196
2194 gfx::Rect RenderWidgetHostViewAura::ConvertRectToScreen(const gfx::Rect& rect) { 2197 gfx::Rect RenderWidgetHostViewAura::ConvertRectToScreen(const gfx::Rect& rect) {
2195 gfx::Point origin = rect.origin(); 2198 gfx::Point origin = rect.origin();
2196 gfx::Point end = gfx::Point(rect.right(), rect.bottom()); 2199 gfx::Point end = gfx::Point(rect.right(), rect.bottom());
2197 2200
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
3259 RenderWidgetHost* widget) { 3262 RenderWidgetHost* widget) {
3260 return new RenderWidgetHostViewAura(widget); 3263 return new RenderWidgetHostViewAura(widget);
3261 } 3264 }
3262 3265
3263 // static 3266 // static
3264 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3267 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3265 GetScreenInfoForWindow(results, NULL); 3268 GetScreenInfoForWindow(results, NULL);
3266 } 3269 }
3267 3270
3268 } // namespace content 3271 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | ui/base/ime/input_method_imm32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698