summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webview_color_overlay.h
blob: 3a2b9d1042e507f874350c40741f25b46d957acf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "third_party/WebKit/public/platform/WebRect.h"
#include "third_party/WebKit/public/web/WebPageOverlay.h"
#include "third_party/skia/include/core/SkColor.h"

namespace content {
class RenderView;
}

// This class draws the given color on a PageOverlay of a WebView.
class WebViewColorOverlay : public blink::WebPageOverlay {
 public:
  WebViewColorOverlay(content::RenderView* render_view, SkColor color);
  virtual ~WebViewColorOverlay();

 private:
  // blink::WebPageOverlay implementation:
  virtual void paintPageOverlay(blink::WebCanvas* canvas);

  content::RenderView* render_view_;
  SkColor color_;

  DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay);
};

#endif  // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_