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

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

Issue 2702153003: [content] Fix background color update handling in RWHVAura. (Closed)
Patch Set: Remove GetBackgroundOpaque and base impls of accessors. 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 gfx::NativeView GetNativeView() const override; 108 gfx::NativeView GetNativeView() const override;
109 gfx::NativeViewAccessible GetNativeViewAccessible() override; 109 gfx::NativeViewAccessible GetNativeViewAccessible() override;
110 ui::TextInputClient* GetTextInputClient() override; 110 ui::TextInputClient* GetTextInputClient() override;
111 bool HasFocus() const override; 111 bool HasFocus() const override;
112 bool IsSurfaceAvailableForCopy() const override; 112 bool IsSurfaceAvailableForCopy() const override;
113 void Show() override; 113 void Show() override;
114 void Hide() override; 114 void Hide() override;
115 bool IsShowing() override; 115 bool IsShowing() override;
116 gfx::Rect GetViewBounds() const override; 116 gfx::Rect GetViewBounds() const override;
117 void SetBackgroundColor(SkColor color) override; 117 void SetBackgroundColor(SkColor color) override;
118 SkColor background_color() const override;
118 bool IsMouseLocked() override; 119 bool IsMouseLocked() override;
119 gfx::Size GetVisibleViewportSize() const override; 120 gfx::Size GetVisibleViewportSize() const override;
120 void SetInsets(const gfx::Insets& insets) override; 121 void SetInsets(const gfx::Insets& insets) override;
121 void FocusedNodeTouched(const gfx::Point& location_dips_screen, 122 void FocusedNodeTouched(const gfx::Point& location_dips_screen,
122 bool editable) override; 123 bool editable) override;
123 void SetNeedsBeginFrames(bool needs_begin_frames) override; 124 void SetNeedsBeginFrames(bool needs_begin_frames) override;
124 125
125 // Overridden from RenderWidgetHostViewBase: 126 // Overridden from RenderWidgetHostViewBase:
126 void InitAsPopup(RenderWidgetHostView* parent_host_view, 127 void InitAsPopup(RenderWidgetHostView* parent_host_view,
127 const gfx::Rect& pos) override; 128 const gfx::Rect& pos) override;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_| 459 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_|
459 // and to notify the |event_handler_|. 460 // and to notify the |event_handler_|.
460 void SetPopupChild(RenderWidgetHostViewAura* popup_child_host_view); 461 void SetPopupChild(RenderWidgetHostViewAura* popup_child_host_view);
461 462
462 // Forwards a mouse event to this view's parent window delegate. 463 // Forwards a mouse event to this view's parent window delegate.
463 void ForwardMouseEventToParent(ui::MouseEvent* event); 464 void ForwardMouseEventToParent(ui::MouseEvent* event);
464 465
465 // Adds/Removes frame observer based on state. 466 // Adds/Removes frame observer based on state.
466 void UpdateNeedsBeginFramesInternal(); 467 void UpdateNeedsBeginFramesInternal();
467 468
469 // Applies background color without notifying the RenderWidget about
470 // opaqueness changes.
471 void UpdateBackgroundColorFromRenderer(SkColor color);
472
468 // The model object. 473 // The model object.
469 RenderWidgetHostImpl* const host_; 474 RenderWidgetHostImpl* const host_;
470 475
471 aura::Window* window_; 476 aura::Window* window_;
472 477
473 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_; 478 std::unique_ptr<DelegatedFrameHostClient> delegated_frame_host_client_;
474 // NOTE: this may be null. 479 // NOTE: this may be null.
475 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_; 480 std::unique_ptr<DelegatedFrameHost> delegated_frame_host_;
476 481
477 std::unique_ptr<WindowObserver> window_observer_; 482 std::unique_ptr<WindowObserver> window_observer_;
(...skipping 24 matching lines...) Expand all
502 507
503 // The cursor for the page. This is passed up from the renderer. 508 // The cursor for the page. This is passed up from the renderer.
504 WebCursor current_cursor_; 509 WebCursor current_cursor_;
505 510
506 // Indicates if there is onging composition text. 511 // Indicates if there is onging composition text.
507 bool has_composition_text_; 512 bool has_composition_text_;
508 513
509 // Current tooltip text. 514 // Current tooltip text.
510 base::string16 tooltip_; 515 base::string16 tooltip_;
511 516
517 // The background color of the web content.
518 SkColor background_color_;
519
512 // The begin frame source being observed. Null if none. 520 // The begin frame source being observed. Null if none.
513 cc::BeginFrameSource* begin_frame_source_; 521 cc::BeginFrameSource* begin_frame_source_;
514 cc::BeginFrameArgs last_begin_frame_args_; 522 cc::BeginFrameArgs last_begin_frame_args_;
515 523
516 // Whether a request for begin frames has been issued. 524 // Whether a request for begin frames has been issued.
517 bool needs_begin_frames_; 525 bool needs_begin_frames_;
518 526
519 // Whether a request to flush input has been issued. 527 // Whether a request to flush input has been issued.
520 bool needs_flush_input_; 528 bool needs_flush_input_;
521 529
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_; 595 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_;
588 596
589 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 597 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
590 598
591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 599 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
592 }; 600 };
593 601
594 } // namespace content 602 } // namespace content
595 603
596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 604 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698