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

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

Issue 1934423002: [NOT FOR REVIEW] [reland] Browser Side Text Input State Tracking for OOPIF (Aura Only) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enhancing code Created 4 years, 7 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
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 #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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 namespace content { 77 namespace content {
78 #if defined(OS_WIN) 78 #if defined(OS_WIN)
79 class LegacyRenderWidgetHostHWND; 79 class LegacyRenderWidgetHostHWND;
80 #endif 80 #endif
81 81
82 class OverscrollController; 82 class OverscrollController;
83 class RenderFrameHostImpl; 83 class RenderFrameHostImpl;
84 class RenderViewHostDelegateView; 84 class RenderViewHostDelegateView;
85 class RenderWidgetHostImpl; 85 class RenderWidgetHostImpl;
86 class RenderWidgetHostView; 86 class RenderWidgetHostView;
87 class TextInputManager;
87 class TouchSelectionControllerClientAura; 88 class TouchSelectionControllerClientAura;
88 struct TextInputState; 89 struct TextInputState;
89 90
90 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. 91 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
91 class CONTENT_EXPORT RenderWidgetHostViewAura 92 class CONTENT_EXPORT RenderWidgetHostViewAura
92 : public RenderWidgetHostViewBase, 93 : public RenderWidgetHostViewBase,
93 public DelegatedFrameHostClient, 94 public DelegatedFrameHostClient,
94 public ui::TextInputClient, 95 public ui::TextInputClient,
95 public display::DisplayObserver, 96 public display::DisplayObserver,
96 public aura::WindowTreeHostObserver, 97 public aura::WindowTreeHostObserver,
(...skipping 30 matching lines...) Expand all
127 gfx::Size GetVisibleViewportSize() const override; 128 gfx::Size GetVisibleViewportSize() const override;
128 void SetInsets(const gfx::Insets& insets) override; 129 void SetInsets(const gfx::Insets& insets) override;
129 130
130 // Overridden from RenderWidgetHostViewBase: 131 // Overridden from RenderWidgetHostViewBase:
131 void InitAsPopup(RenderWidgetHostView* parent_host_view, 132 void InitAsPopup(RenderWidgetHostView* parent_host_view,
132 const gfx::Rect& pos) override; 133 const gfx::Rect& pos) override;
133 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 134 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
134 void Focus() override; 135 void Focus() override;
135 void UpdateCursor(const WebCursor& cursor) override; 136 void UpdateCursor(const WebCursor& cursor) override;
136 void SetIsLoading(bool is_loading) override; 137 void SetIsLoading(bool is_loading) override;
137 void TextInputStateChanged(const TextInputState& params) override;
138 void ImeCancelComposition() override; 138 void ImeCancelComposition() override;
139 void ImeCompositionRangeChanged( 139 void ImeCompositionRangeChanged(
140 const gfx::Range& range, 140 const gfx::Range& range,
141 const std::vector<gfx::Rect>& character_bounds) override; 141 const std::vector<gfx::Rect>& character_bounds) override;
142 void RenderProcessGone(base::TerminationStatus status, 142 void RenderProcessGone(base::TerminationStatus status,
143 int error_code) override; 143 int error_code) override;
144 void Destroy() override; 144 void Destroy() override;
145 void SetTooltipText(const base::string16& tooltip_text) override; 145 void SetTooltipText(const base::string16& tooltip_text) override;
146 void SelectionChanged(const base::string16& text, 146 void SelectionChanged(const base::string16& text,
147 size_t offset, 147 size_t offset,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 aura::Window* window() { return window_; } 346 aura::Window* window() { return window_; }
347 347
348 DelegatedFrameHost* GetDelegatedFrameHost() const { 348 DelegatedFrameHost* GetDelegatedFrameHost() const {
349 return delegated_frame_host_.get(); 349 return delegated_frame_host_.get();
350 } 350 }
351 351
352 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } 352 const ui::MotionEventAura& pointer_state() const { return pointer_state_; }
353 353
354 private: 354 private:
355 friend class RenderWidgetHostViewAuraCopyRequestTest; 355 friend class RenderWidgetHostViewAuraCopyRequestTest;
356 friend class TestInputMethodObserver;
356 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 357 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
357 PopupRetainsCaptureAfterMouseRelease); 358 PopupRetainsCaptureAfterMouseRelease);
358 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); 359 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText);
359 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); 360 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState);
360 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 361 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
361 TouchEventPositionsArentRounded); 362 TouchEventPositionsArentRounded);
362 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync); 363 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventSyncAsync);
363 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, Resize); 364 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, Resize);
364 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow); 365 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SwapNotifiesWindow);
365 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers); 366 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, RecreateLayers);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // handled if it should not be further processed. 522 // handled if it should not be further processed.
522 void HandleGestureForTouchSelection(ui::GestureEvent* event); 523 void HandleGestureForTouchSelection(ui::GestureEvent* event);
523 524
524 // Forwards a mouse event to this view's parent window delegate. 525 // Forwards a mouse event to this view's parent window delegate.
525 void ForwardMouseEventToParent(ui::MouseEvent* event); 526 void ForwardMouseEventToParent(ui::MouseEvent* event);
526 527
527 // Returns the RenderViewHostDelegateView instance for this view. Returns 528 // Returns the RenderViewHostDelegateView instance for this view. Returns
528 // NULL on failure. 529 // NULL on failure.
529 RenderViewHostDelegateView* GetRenderViewHostDelegateView(); 530 RenderViewHostDelegateView* GetRenderViewHostDelegateView();
530 531
532 void OnTextInputStateUpdated(TextInputManager* text_input_manager,
533 RenderWidgetHostViewBase* updated_view,
534 bool changed) override;
535
531 // The model object. 536 // The model object.
532 RenderWidgetHostImpl* const host_; 537 RenderWidgetHostImpl* const host_;
533 538
534 aura::Window* window_; 539 aura::Window* window_;
535 540
536 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; 541 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_;
537 542
538 std::unique_ptr<WindowObserver> window_observer_; 543 std::unique_ptr<WindowObserver> window_observer_;
539 544
540 // Tracks the ancestors of the RWHVA window for window location changes. 545 // Tracks the ancestors of the RWHVA window for window location changes.
(...skipping 23 matching lines...) Expand all
564 // True when content is being loaded. Used to show an hourglass cursor. 569 // True when content is being loaded. Used to show an hourglass cursor.
565 bool is_loading_; 570 bool is_loading_;
566 571
567 // The cursor for the page. This is passed up from the renderer. 572 // The cursor for the page. This is passed up from the renderer.
568 WebCursor current_cursor_; 573 WebCursor current_cursor_;
569 574
570 // Stores the current state of the active pointers targeting this 575 // Stores the current state of the active pointers targeting this
571 // object. 576 // object.
572 ui::MotionEventAura pointer_state_; 577 ui::MotionEventAura pointer_state_;
573 578
574 // The current text input type.
575 ui::TextInputType text_input_type_;
576 // The current text input mode corresponding to HTML5 inputmode attribute.
577 ui::TextInputMode text_input_mode_;
578 // The current text input flags.
579 int text_input_flags_;
580 bool can_compose_inline_;
581
582 // Bounds for the selection. 579 // Bounds for the selection.
583 ui::SelectionBound selection_anchor_; 580 ui::SelectionBound selection_anchor_;
584 ui::SelectionBound selection_focus_; 581 ui::SelectionBound selection_focus_;
585 582
586 // The current composition character bounds. 583 // The current composition character bounds.
587 std::vector<gfx::Rect> composition_character_bounds_; 584 std::vector<gfx::Rect> composition_character_bounds_;
588 585
589 // Indicates if there is onging composition text. 586 // Indicates if there is onging composition text.
590 bool has_composition_text_; 587 bool has_composition_text_;
591 588
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 bool disable_input_event_router_for_testing_; 687 bool disable_input_event_router_for_testing_;
691 688
692 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 689 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
693 690
694 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 691 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
695 }; 692 };
696 693
697 } // namespace content 694 } // namespace content
698 695
699 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 696 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698