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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 gfx::Vector2dF GetLastScrollOffset() const override; | 105 gfx::Vector2dF GetLastScrollOffset() const override; |
106 gfx::NativeView GetNativeView() const override; | 106 gfx::NativeView GetNativeView() const override; |
107 gfx::NativeViewAccessible GetNativeViewAccessible() override; | 107 gfx::NativeViewAccessible GetNativeViewAccessible() override; |
108 ui::TextInputClient* GetTextInputClient() override; | 108 ui::TextInputClient* GetTextInputClient() override; |
109 bool HasFocus() const override; | 109 bool HasFocus() const override; |
110 void Show() override; | 110 void Show() override; |
111 void Hide() override; | 111 void Hide() override; |
112 bool IsShowing() override; | 112 bool IsShowing() override; |
113 gfx::Rect GetViewBounds() const override; | 113 gfx::Rect GetViewBounds() const override; |
114 void SetBackgroundColor(SkColor color) override; | 114 void SetBackgroundColor(SkColor color) override; |
| 115 SkColor background_color() const override; |
115 bool IsMouseLocked() override; | 116 bool IsMouseLocked() override; |
116 gfx::Size GetVisibleViewportSize() const override; | 117 gfx::Size GetVisibleViewportSize() const override; |
117 void SetInsets(const gfx::Insets& insets) override; | 118 void SetInsets(const gfx::Insets& insets) override; |
118 void FocusedNodeTouched(const gfx::Point& location_dips_screen, | 119 void FocusedNodeTouched(const gfx::Point& location_dips_screen, |
119 bool editable) override; | 120 bool editable) override; |
120 void SetNeedsBeginFrames(bool needs_begin_frames) override; | 121 void SetNeedsBeginFrames(bool needs_begin_frames) override; |
121 | 122 |
122 // Overridden from RenderWidgetHostViewBase: | 123 // Overridden from RenderWidgetHostViewBase: |
123 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 124 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
124 const gfx::Rect& pos) override; | 125 const gfx::Rect& pos) override; |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_| | 457 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_| |
457 // and to notify the |event_handler_|. | 458 // and to notify the |event_handler_|. |
458 void SetPopupChild(RenderWidgetHostViewAura* popup_child_host_view); | 459 void SetPopupChild(RenderWidgetHostViewAura* popup_child_host_view); |
459 | 460 |
460 // Forwards a mouse event to this view's parent window delegate. | 461 // Forwards a mouse event to this view's parent window delegate. |
461 void ForwardMouseEventToParent(ui::MouseEvent* event); | 462 void ForwardMouseEventToParent(ui::MouseEvent* event); |
462 | 463 |
463 // Tells DelegatedFrameHost whether we need to receive BeginFrames. | 464 // Tells DelegatedFrameHost whether we need to receive BeginFrames. |
464 void UpdateNeedsBeginFramesInternal(); | 465 void UpdateNeedsBeginFramesInternal(); |
465 | 466 |
| 467 // Applies background color without notifying the RenderWidget about |
| 468 // opaqueness changes. |
| 469 void UpdateBackgroundColorFromRenderer(SkColor color); |
| 470 |
466 // The model object. | 471 // The model object. |
467 RenderWidgetHostImpl* const host_; | 472 RenderWidgetHostImpl* const host_; |
468 | 473 |
469 aura::Window* window_; | 474 aura::Window* window_; |
470 | 475 |
471 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_; | 476 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_; |
472 // NOTE: this may be null. | 477 // NOTE: this may be null. |
473 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; | 478 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; |
474 | 479 |
475 std::unique_ptr<WindowObserver> window_observer_; | 480 std::unique_ptr<WindowObserver> window_observer_; |
(...skipping 24 matching lines...) Expand all Loading... |
500 | 505 |
501 // The cursor for the page. This is passed up from the renderer. | 506 // The cursor for the page. This is passed up from the renderer. |
502 WebCursor current_cursor_; | 507 WebCursor current_cursor_; |
503 | 508 |
504 // Indicates if there is onging composition text. | 509 // Indicates if there is onging composition text. |
505 bool has_composition_text_; | 510 bool has_composition_text_; |
506 | 511 |
507 // Current tooltip text. | 512 // Current tooltip text. |
508 base::string16 tooltip_; | 513 base::string16 tooltip_; |
509 | 514 |
| 515 // The background color of the web content. |
| 516 SkColor background_color_; |
| 517 |
510 // Whether a request for begin frames has been issued. | 518 // Whether a request for begin frames has been issued. |
511 bool needs_begin_frames_; | 519 bool needs_begin_frames_; |
512 | 520 |
513 // Whether a request to flush input has been issued. | 521 // Whether a request to flush input has been issued. |
514 bool needs_flush_input_; | 522 bool needs_flush_input_; |
515 | 523 |
516 // Whether or not a frame observer has been added. | 524 // Whether or not a frame observer has been added. |
517 bool added_frame_observer_; | 525 bool added_frame_observer_; |
518 | 526 |
519 // Used to track the last cursor visibility update that was sent to the | 527 // 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 Loading... |
576 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_; | 584 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_; |
577 | 585 |
578 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 586 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
579 | 587 |
580 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 588 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
581 }; | 589 }; |
582 | 590 |
583 } // namespace content | 591 } // namespace content |
584 | 592 |
585 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 593 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |