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

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

Issue 2776973002: DelegatedFrameHost should not create an ExternalBeginFrameSource (Closed)
Patch Set: c Created 3 years, 9 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 class CONTENT_EXPORT RenderWidgetHostViewAura 82 class CONTENT_EXPORT RenderWidgetHostViewAura
83 : public RenderWidgetHostViewBase, 83 : public RenderWidgetHostViewBase,
84 NON_EXPORTED_BASE(public RenderWidgetHostViewEventHandler::Delegate), 84 NON_EXPORTED_BASE(public RenderWidgetHostViewEventHandler::Delegate),
85 public TextInputManager::Observer, 85 public TextInputManager::Observer,
86 public ui::TextInputClient, 86 public ui::TextInputClient,
87 public display::DisplayObserver, 87 public display::DisplayObserver,
88 public aura::WindowTreeHostObserver, 88 public aura::WindowTreeHostObserver,
89 public aura::WindowDelegate, 89 public aura::WindowDelegate,
90 public aura::client::ActivationDelegate, 90 public aura::client::ActivationDelegate,
91 public aura::client::FocusChangeObserver, 91 public aura::client::FocusChangeObserver,
92 public aura::client::CursorClientObserver, 92 public aura::client::CursorClientObserver {
93 public cc::BeginFrameObserver {
94 public: 93 public:
95 // When |is_guest_view_hack| is true, this view isn't really the view for 94 // When |is_guest_view_hack| is true, this view isn't really the view for
96 // the |widget|, a RenderWidgetHostViewGuest is. 95 // the |widget|, a RenderWidgetHostViewGuest is.
97 // 96 //
98 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated 97 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated
99 // to use RWHVChildFrame (http://crbug.com/330264). 98 // to use RWHVChildFrame (http://crbug.com/330264).
100 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack); 99 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack);
101 100
102 // RenderWidgetHostView implementation. 101 // RenderWidgetHostView implementation.
103 void InitAsChild(gfx::NativeView parent_view) override; 102 void InitAsChild(gfx::NativeView parent_view) override;
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 RenderWidgetHostViewBase* updated_view, 424 RenderWidgetHostViewBase* updated_view,
426 bool did_update_state) override; 425 bool did_update_state) override;
427 void OnImeCancelComposition(TextInputManager* text_input_manager, 426 void OnImeCancelComposition(TextInputManager* text_input_manager,
428 RenderWidgetHostViewBase* updated_view) override; 427 RenderWidgetHostViewBase* updated_view) override;
429 void OnSelectionBoundsChanged( 428 void OnSelectionBoundsChanged(
430 TextInputManager* text_input_manager, 429 TextInputManager* text_input_manager,
431 RenderWidgetHostViewBase* updated_view) override; 430 RenderWidgetHostViewBase* updated_view) override;
432 void OnTextSelectionChanged(TextInputManager* text_input_mangager, 431 void OnTextSelectionChanged(TextInputManager* text_input_mangager,
433 RenderWidgetHostViewBase* updated_view) override; 432 RenderWidgetHostViewBase* updated_view) override;
434 433
435 // cc::BeginFrameObserver implementation. 434 void OnBeginFrame(const cc::BeginFrameArgs& args);
436 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
437 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override;
438 void OnBeginFrameSourcePausedChanged(bool paused) override;
439 435
440 // Detaches |this| from the input method object. 436 // Detaches |this| from the input method object.
441 void DetachFromInputMethod(); 437 void DetachFromInputMethod();
442 438
443 // Dismisses a Web Popup on a mouse or touch press outside the popup and its 439 // Dismisses a Web Popup on a mouse or touch press outside the popup and its
444 // parent. 440 // parent.
445 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); 441 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event);
446 442
447 // Converts |rect| from screen coordinate to window coordinate. 443 // Converts |rect| from screen coordinate to window coordinate.
448 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; 444 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const;
449 445
450 // Called when the parent window bounds change. 446 // Called when the parent window bounds change.
451 void HandleParentBoundsChanged(); 447 void HandleParentBoundsChanged();
452 448
453 // Called when the parent window hierarchy for our window changes. 449 // Called when the parent window hierarchy for our window changes.
454 void ParentHierarchyChanged(); 450 void ParentHierarchyChanged();
455 451
456 // Helper function to create a selection controller. 452 // Helper function to create a selection controller.
457 void CreateSelectionController(); 453 void CreateSelectionController();
458 454
459 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_| 455 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_|
460 // and to notify the |event_handler_|. 456 // and to notify the |event_handler_|.
461 void SetPopupChild(RenderWidgetHostViewAura* popup_child_host_view); 457 void SetPopupChild(RenderWidgetHostViewAura* popup_child_host_view);
462 458
463 // Forwards a mouse event to this view's parent window delegate. 459 // Forwards a mouse event to this view's parent window delegate.
464 void ForwardMouseEventToParent(ui::MouseEvent* event); 460 void ForwardMouseEventToParent(ui::MouseEvent* event);
465 461
466 // Adds/Removes frame observer based on state. 462 // Tells DelegatedFrameHost whether we need to receive BeginFrames.
467 void UpdateNeedsBeginFramesInternal(); 463 void UpdateNeedsBeginFramesInternal();
468 464
469 // The model object. 465 // The model object.
470 RenderWidgetHostImpl* const host_; 466 RenderWidgetHostImpl* const host_;
471 467
472 aura::Window* window_; 468 aura::Window* window_;
473 469
474 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_; 470 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_;
475 // NOTE: this may be null. 471 // NOTE: this may be null.
476 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; 472 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_;
(...skipping 26 matching lines...) Expand all
503 499
504 // The cursor for the page. This is passed up from the renderer. 500 // The cursor for the page. This is passed up from the renderer.
505 WebCursor current_cursor_; 501 WebCursor current_cursor_;
506 502
507 // Indicates if there is onging composition text. 503 // Indicates if there is onging composition text.
508 bool has_composition_text_; 504 bool has_composition_text_;
509 505
510 // Current tooltip text. 506 // Current tooltip text.
511 base::string16 tooltip_; 507 base::string16 tooltip_;
512 508
513 // The begin frame source being observed. Null if none.
514 cc::BeginFrameSource* begin_frame_source_;
515 cc::BeginFrameArgs last_begin_frame_args_;
516
517 // Whether a request for begin frames has been issued. 509 // Whether a request for begin frames has been issued.
518 bool needs_begin_frames_; 510 bool needs_begin_frames_;
519 511
520 // Whether a request to flush input has been issued. 512 // Whether a request to flush input has been issued.
521 bool needs_flush_input_; 513 bool needs_flush_input_;
522 514
523 // Whether or not a frame observer has been added. 515 // Whether or not a frame observer has been added.
524 bool added_frame_observer_; 516 bool added_frame_observer_;
525 517
526 // Used to track the last cursor visibility update that was sent to the 518 // Used to track the last cursor visibility update that was sent to the
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_; 575 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_;
584 576
585 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 577 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
586 578
587 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 579 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
588 }; 580 };
589 581
590 } // namespace content 582 } // namespace content
591 583
592 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 584 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698