blob: 3a2b9d1042e507f874350c40741f25b46d957acf [file] [log] [blame]
// 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_