OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ | 5 #ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ |
6 #define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ | 6 #define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "third_party/WebKit/public/platform/WebRect.h" | |
11 #include "third_party/WebKit/public/web/WebPageOverlay.h" | 10 #include "third_party/WebKit/public/web/WebPageOverlay.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
13 | 12 |
14 namespace content { | 13 namespace content { |
15 class RenderView; | 14 class RenderView; |
16 } | 15 } |
17 | 16 |
18 // This class draws the given color on a PageOverlay of a WebView. | 17 // This class draws the given color on a PageOverlay of a WebView. |
19 class WebViewColorOverlay : public blink::WebPageOverlay { | 18 class WebViewColorOverlay : public blink::WebPageOverlay { |
20 public: | 19 public: |
21 WebViewColorOverlay(content::RenderView* render_view, SkColor color); | 20 WebViewColorOverlay(content::RenderView* render_view, SkColor color); |
22 virtual ~WebViewColorOverlay(); | 21 virtual ~WebViewColorOverlay(); |
23 | 22 |
24 private: | 23 private: |
25 // blink::WebPageOverlay implementation: | 24 // blink::WebPageOverlay implementation: |
26 virtual void paintPageOverlay(blink::WebCanvas* canvas); | 25 virtual void paintPageOverlay(blink::WebGraphicsContext* context, |
Lei Zhang
2015/02/12 20:01:21
might as do virtual -> override while we are here.
jbroman
2015/02/12 20:43:59
I've been advised in the past not to use "override
jbroman
2015/02/12 20:47:10
see e.g. https://codereview.chromium.org/679523004
| |
26 const blink::WebSize& webViewSize); | |
27 | 27 |
28 content::RenderView* render_view_; | 28 content::RenderView* render_view_; |
29 SkColor color_; | 29 SkColor color_; |
30 | 30 |
31 DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay); | 31 DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay); |
32 }; | 32 }; |
33 | 33 |
34 #endif // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ | 34 #endif // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ |
OLD | NEW |