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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageOverlay.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageOverlay.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class RenderView; | 16 class RenderView; |
17 } | 17 } |
18 | 18 |
19 // This class draws the given color on a PageOverlay of a WebView. | 19 // This class draws the given color on a PageOverlay of a WebView. |
20 class WebViewColorOverlay : public WebKit::WebPageOverlay { | 20 class WebViewColorOverlay : public WebKit::WebPageOverlay { |
21 public: | 21 public: |
22 WebViewColorOverlay(content::RenderView* render_view, SkColor color); | 22 WebViewColorOverlay(content::RenderView* render_view, SkColor color); |
23 virtual ~WebViewColorOverlay(); | 23 virtual ~WebViewColorOverlay(); |
24 | 24 |
25 private: | 25 private: |
26 // WebKit::WebPageOverlay implementation: | 26 // WebKit::WebPageOverlay implementation: |
27 virtual void paintPageOverlay(WebKit::WebCanvas* canvas); | 27 virtual void paintPageOverlay(WebKit::WebCanvas* canvas); |
28 | 28 |
29 content::RenderView* render_view_; | 29 content::RenderView* render_view_; |
30 SkColor color_; | 30 SkColor color_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay); | 32 DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay); |
33 }; | 33 }; |
34 | 34 |
35 #endif // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ | 35 #endif // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_ |
OLD | NEW |