OLD | NEW |
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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 gfx::Size GetVisibleViewportSize() const override; | 127 gfx::Size GetVisibleViewportSize() const override; |
128 void SetInsets(const gfx::Insets& insets) override; | 128 void SetInsets(const gfx::Insets& insets) override; |
129 | 129 |
130 // Overridden from RenderWidgetHostViewBase: | 130 // Overridden from RenderWidgetHostViewBase: |
131 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 131 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
132 const gfx::Rect& pos) override; | 132 const gfx::Rect& pos) override; |
133 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; | 133 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; |
134 void Focus() override; | 134 void Focus() override; |
135 void UpdateCursor(const WebCursor& cursor) override; | 135 void UpdateCursor(const WebCursor& cursor) override; |
136 void SetIsLoading(bool is_loading) override; | 136 void SetIsLoading(bool is_loading) override; |
137 void TextInputStateChanged(const TextInputState& params) override; | |
138 void ImeCancelComposition() override; | 137 void ImeCancelComposition() override; |
139 void ImeCompositionRangeChanged( | 138 void ImeCompositionRangeChanged( |
140 const gfx::Range& range, | 139 const gfx::Range& range, |
141 const std::vector<gfx::Rect>& character_bounds) override; | 140 const std::vector<gfx::Rect>& character_bounds) override; |
142 void RenderProcessGone(base::TerminationStatus status, | 141 void RenderProcessGone(base::TerminationStatus status, |
143 int error_code) override; | 142 int error_code) override; |
144 void Destroy() override; | 143 void Destroy() override; |
145 void SetTooltipText(const base::string16& tooltip_text) override; | 144 void SetTooltipText(const base::string16& tooltip_text) override; |
146 void SelectionChanged(const base::string16& text, | 145 void SelectionChanged(const base::string16& text, |
147 size_t offset, | 146 size_t offset, |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 aura::Window* window() { return window_; } | 334 aura::Window* window() { return window_; } |
336 | 335 |
337 DelegatedFrameHost* GetDelegatedFrameHost() const { | 336 DelegatedFrameHost* GetDelegatedFrameHost() const { |
338 return delegated_frame_host_.get(); | 337 return delegated_frame_host_.get(); |
339 } | 338 } |
340 | 339 |
341 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } | 340 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } |
342 | 341 |
343 private: | 342 private: |
344 friend class RenderWidgetHostViewAuraCopyRequestTest; | 343 friend class RenderWidgetHostViewAuraCopyRequestTest; |
| 344 friend class TestInputMethodObserver; |
345 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 345 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
346 PopupRetainsCaptureAfterMouseRelease); | 346 PopupRetainsCaptureAfterMouseRelease); |
347 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); | 347 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); |
348 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); | 348 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); |
349 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 349 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
350 TouchEventPositionsArentRounded); | 350 TouchEventPositionsArentRounded); |
351 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); | 351 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); |
352 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, Resize); | 352 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, Resize); |
353 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); | 353 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); |
354 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers); | 354 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 // handled if it should not be further processed. | 511 // handled if it should not be further processed. |
512 void HandleGestureForTouchSelection(ui::GestureEvent* event); | 512 void HandleGestureForTouchSelection(ui::GestureEvent* event); |
513 | 513 |
514 // Forwards a mouse event to this view's parent window delegate. | 514 // Forwards a mouse event to this view's parent window delegate. |
515 void ForwardMouseEventToParent(ui::MouseEvent* event); | 515 void ForwardMouseEventToParent(ui::MouseEvent* event); |
516 | 516 |
517 // Returns the RenderViewHostDelegateView instance for this view. Returns | 517 // Returns the RenderViewHostDelegateView instance for this view. Returns |
518 // NULL on failure. | 518 // NULL on failure. |
519 RenderViewHostDelegateView* GetRenderViewHostDelegateView(); | 519 RenderViewHostDelegateView* GetRenderViewHostDelegateView(); |
520 | 520 |
| 521 // TextInputManager::Observer implementation. |
| 522 void OnTextInputStateUpdated(TextInputManager* text_input_manager, |
| 523 RenderWidgetHostViewBase* updated_view) override; |
| 524 void OnTextInputStateUpdateCalled( |
| 525 TextInputManager* text_input_manager) override; |
| 526 |
521 // The model object. | 527 // The model object. |
522 RenderWidgetHostImpl* const host_; | 528 RenderWidgetHostImpl* const host_; |
523 | 529 |
524 aura::Window* window_; | 530 aura::Window* window_; |
525 | 531 |
526 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; | 532 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; |
527 | 533 |
528 std::unique_ptr<WindowObserver> window_observer_; | 534 std::unique_ptr<WindowObserver> window_observer_; |
529 | 535 |
530 // Tracks the ancestors of the RWHVA window for window location changes. | 536 // Tracks the ancestors of the RWHVA window for window location changes. |
(...skipping 23 matching lines...) Expand all Loading... |
554 // True when content is being loaded. Used to show an hourglass cursor. | 560 // True when content is being loaded. Used to show an hourglass cursor. |
555 bool is_loading_; | 561 bool is_loading_; |
556 | 562 |
557 // The cursor for the page. This is passed up from the renderer. | 563 // The cursor for the page. This is passed up from the renderer. |
558 WebCursor current_cursor_; | 564 WebCursor current_cursor_; |
559 | 565 |
560 // Stores the current state of the active pointers targeting this | 566 // Stores the current state of the active pointers targeting this |
561 // object. | 567 // object. |
562 ui::MotionEventAura pointer_state_; | 568 ui::MotionEventAura pointer_state_; |
563 | 569 |
564 // The current text input type. | |
565 ui::TextInputType text_input_type_; | |
566 // The current text input mode corresponding to HTML5 inputmode attribute. | |
567 ui::TextInputMode text_input_mode_; | |
568 // The current text input flags. | |
569 int text_input_flags_; | |
570 bool can_compose_inline_; | |
571 | |
572 // Bounds for the selection. | 570 // Bounds for the selection. |
573 ui::SelectionBound selection_anchor_; | 571 ui::SelectionBound selection_anchor_; |
574 ui::SelectionBound selection_focus_; | 572 ui::SelectionBound selection_focus_; |
575 | 573 |
576 // The current composition character bounds. | 574 // The current composition character bounds. |
577 std::vector<gfx::Rect> composition_character_bounds_; | 575 std::vector<gfx::Rect> composition_character_bounds_; |
578 | 576 |
579 // Indicates if there is onging composition text. | 577 // Indicates if there is onging composition text. |
580 bool has_composition_text_; | 578 bool has_composition_text_; |
581 | 579 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 bool disable_input_event_router_for_testing_; | 671 bool disable_input_event_router_for_testing_; |
674 | 672 |
675 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 673 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
676 | 674 |
677 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 675 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
678 }; | 676 }; |
679 | 677 |
680 } // namespace content | 678 } // namespace content |
681 | 679 |
682 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 680 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |