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

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

Issue 2057803002: Tracking SelectionBounds for all RenderWidgets on the Browser Side (Aura Only) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing creis@'s comments Created 4 years, 5 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const gfx::Range& range, 146 const gfx::Range& range,
147 const std::vector<gfx::Rect>& character_bounds) override; 147 const std::vector<gfx::Rect>& character_bounds) override;
148 void RenderProcessGone(base::TerminationStatus status, 148 void RenderProcessGone(base::TerminationStatus status,
149 int error_code) override; 149 int error_code) override;
150 void Destroy() override; 150 void Destroy() override;
151 void SetTooltipText(const base::string16& tooltip_text) override; 151 void SetTooltipText(const base::string16& tooltip_text) override;
152 void SelectionChanged(const base::string16& text, 152 void SelectionChanged(const base::string16& text,
153 size_t offset, 153 size_t offset,
154 const gfx::Range& range) override; 154 const gfx::Range& range) override;
155 gfx::Size GetRequestedRendererSize() const override; 155 gfx::Size GetRequestedRendererSize() const override;
156 void SelectionBoundsChanged(
157 const ViewHostMsg_SelectionBounds_Params& params) override;
158 void CopyFromCompositingSurface( 156 void CopyFromCompositingSurface(
159 const gfx::Rect& src_subrect, 157 const gfx::Rect& src_subrect,
160 const gfx::Size& dst_size, 158 const gfx::Size& dst_size,
161 const ReadbackRequestCallback& callback, 159 const ReadbackRequestCallback& callback,
162 const SkColorType preferred_color_type) override; 160 const SkColorType preferred_color_type) override;
163 void CopyFromCompositingSurfaceToVideoFrame( 161 void CopyFromCompositingSurfaceToVideoFrame(
164 const gfx::Rect& src_subrect, 162 const gfx::Rect& src_subrect,
165 const scoped_refptr<media::VideoFrame>& target, 163 const scoped_refptr<media::VideoFrame>& target,
166 const base::Callback<void(const gfx::Rect&, bool)>& callback) override; 164 const base::Callback<void(const gfx::Rect&, bool)>& callback) override;
167 bool CanCopyToVideoFrame() const override; 165 bool CanCopyToVideoFrame() const override;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // Exposed for tests. 340 // Exposed for tests.
343 aura::Window* window() { return window_; } 341 aura::Window* window() { return window_; }
344 342
345 DelegatedFrameHost* GetDelegatedFrameHost() const { 343 DelegatedFrameHost* GetDelegatedFrameHost() const {
346 return delegated_frame_host_.get(); 344 return delegated_frame_host_.get();
347 } 345 }
348 346
349 const ui::MotionEventAura& pointer_state() const { return pointer_state_; } 347 const ui::MotionEventAura& pointer_state() const { return pointer_state_; }
350 348
351 private: 349 private:
352 friend class InputMethodResultAuraTest; 350 friend class InputMethodAuraTestBase;
353 friend class RenderWidgetHostViewAuraCopyRequestTest; 351 friend class RenderWidgetHostViewAuraCopyRequestTest;
354 friend class TestInputMethodObserver; 352 friend class TestInputMethodObserver;
355 FRIEND_TEST_ALL_PREFIXES(InputMethodResultAuraTest, 353 FRIEND_TEST_ALL_PREFIXES(InputMethodResultAuraTest,
356 FinishImeCompositionSession); 354 FinishImeCompositionSession);
357 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 355 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
358 PopupRetainsCaptureAfterMouseRelease); 356 PopupRetainsCaptureAfterMouseRelease);
359 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText); 357 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, SetCompositionText);
360 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState); 358 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, TouchEventState);
361 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, 359 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest,
362 TouchEventPositionsArentRounded); 360 TouchEventPositionsArentRounded);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 const base::TimeTicks& timebase, 467 const base::TimeTicks& timebase,
470 const base::TimeDelta& interval) override; 468 const base::TimeDelta& interval) override;
471 void SetBeginFrameSource(cc::BeginFrameSource* source) override; 469 void SetBeginFrameSource(cc::BeginFrameSource* source) override;
472 470
473 // TextInputManager::Observer implementation. 471 // TextInputManager::Observer implementation.
474 void OnUpdateTextInputStateCalled(TextInputManager* text_input_manager, 472 void OnUpdateTextInputStateCalled(TextInputManager* text_input_manager,
475 RenderWidgetHostViewBase* updated_view, 473 RenderWidgetHostViewBase* updated_view,
476 bool did_update_state) override; 474 bool did_update_state) override;
477 void OnImeCancelComposition(TextInputManager* text_input_manager, 475 void OnImeCancelComposition(TextInputManager* text_input_manager,
478 RenderWidgetHostViewBase* updated_view) override; 476 RenderWidgetHostViewBase* updated_view) override;
477 void OnSelectionBoundsChanged(
478 TextInputManager* text_input_manager,
479 RenderWidgetHostViewBase* updated_view) override;
479 480
480 // cc::BeginFrameObserver implementation. 481 // cc::BeginFrameObserver implementation.
481 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 482 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
482 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override; 483 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override;
483 void OnBeginFrameSourcePausedChanged(bool paused) override; 484 void OnBeginFrameSourcePausedChanged(bool paused) override;
484 485
485 // Detaches |this| from the input method object. 486 // Detaches |this| from the input method object.
486 void DetachFromInputMethod(); 487 void DetachFromInputMethod();
487 488
488 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method 489 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 // True when content is being loaded. Used to show an hourglass cursor. 580 // True when content is being loaded. Used to show an hourglass cursor.
580 bool is_loading_; 581 bool is_loading_;
581 582
582 // The cursor for the page. This is passed up from the renderer. 583 // The cursor for the page. This is passed up from the renderer.
583 WebCursor current_cursor_; 584 WebCursor current_cursor_;
584 585
585 // Stores the current state of the active pointers targeting this 586 // Stores the current state of the active pointers targeting this
586 // object. 587 // object.
587 ui::MotionEventAura pointer_state_; 588 ui::MotionEventAura pointer_state_;
588 589
589 // Bounds for the selection.
590 gfx::SelectionBound selection_anchor_;
591 gfx::SelectionBound selection_focus_;
592
593 // The current composition character bounds. 590 // The current composition character bounds.
594 std::vector<gfx::Rect> composition_character_bounds_; 591 std::vector<gfx::Rect> composition_character_bounds_;
595 592
596 // Indicates if there is onging composition text. 593 // Indicates if there is onging composition text.
597 bool has_composition_text_; 594 bool has_composition_text_;
598 595
599 // Whether return characters should be passed on to the RenderWidgetHostImpl. 596 // Whether return characters should be passed on to the RenderWidgetHostImpl.
600 bool accept_return_character_; 597 bool accept_return_character_;
601 598
602 // Current tooltip text. 599 // Current tooltip text.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 bool disable_input_event_router_for_testing_; 692 bool disable_input_event_router_for_testing_;
696 693
697 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 694 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
698 695
699 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 696 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
700 }; 697 };
701 698
702 } // namespace content 699 } // namespace content
703 700
704 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 701 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698