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

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

Issue 1731373002: Allow to have a transparent UA dependent background. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Decouple background color and transparency in RenderWidgetHostView Created 4 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_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 public: 78 public:
79 ~RenderWidgetHostViewBase() override; 79 ~RenderWidgetHostViewBase() override;
80 80
81 float current_device_scale_factor() const { 81 float current_device_scale_factor() const {
82 return current_device_scale_factor_; 82 return current_device_scale_factor_;
83 } 83 }
84 84
85 // RenderWidgetHostView implementation. 85 // RenderWidgetHostView implementation.
86 void SetBackgroundColor(SkColor color) override; 86 void SetBackgroundColor(SkColor color) override;
87 void SetBackgroundColorToDefault() final; 87 void SetBackgroundColorToDefault() final;
88 void SetBackgroundOpaque(bool opaque) override;
88 bool GetBackgroundOpaque() override; 89 bool GetBackgroundOpaque() override;
89 ui::TextInputClient* GetTextInputClient() override; 90 ui::TextInputClient* GetTextInputClient() override;
90 void WasUnOccluded() override {} 91 void WasUnOccluded() override {}
91 void WasOccluded() override {} 92 void WasOccluded() override {}
92 bool IsShowingContextMenu() const override; 93 bool IsShowingContextMenu() const override;
93 void SetShowingContextMenu(bool showing_menu) override; 94 void SetShowingContextMenu(bool showing_menu) override;
94 base::string16 GetSelectedText() const override; 95 base::string16 GetSelectedText() const override;
95 bool IsMouseLocked() override; 96 bool IsMouseLocked() override;
96 gfx::Size GetVisibleViewportSize() const override; 97 gfx::Size GetVisibleViewportSize() const override;
97 void SetInsets(const gfx::Insets& insets) override; 98 void SetInsets(const gfx::Insets& insets) override;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 static void DetachPluginsHelper(HWND parent); 422 static void DetachPluginsHelper(HWND parent);
422 #endif 423 #endif
423 424
424 // Whether this view is a popup and what kind of popup it is (select, 425 // Whether this view is a popup and what kind of popup it is (select,
425 // autofill...). 426 // autofill...).
426 blink::WebPopupType popup_type_; 427 blink::WebPopupType popup_type_;
427 428
428 // The background color of the web content. 429 // The background color of the web content.
429 SkColor background_color_; 430 SkColor background_color_;
430 431
432 // The background transparency of the web content.
433 bool background_opaque_;
434
431 // While the mouse is locked, the cursor is hidden from the user. Mouse events 435 // While the mouse is locked, the cursor is hidden from the user. Mouse events
432 // are still generated. However, the position they report is the last known 436 // are still generated. However, the position they report is the last known
433 // mouse position just as mouse lock was entered; the movement they report 437 // mouse position just as mouse lock was entered; the movement they report
434 // indicates what the change in position of the mouse would be had it not been 438 // indicates what the change in position of the mouse would be had it not been
435 // locked. 439 // locked.
436 bool mouse_locked_; 440 bool mouse_locked_;
437 441
438 // Whether we are showing a context menu. 442 // Whether we are showing a context menu.
439 bool showing_context_menu_; 443 bool showing_context_menu_;
440 444
(...skipping 30 matching lines...) Expand all
471 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 475 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
472 476
473 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 477 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
474 478
475 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 479 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
476 }; 480 };
477 481
478 } // namespace content 482 } // namespace content
479 483
480 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 484 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698