summaryrefslogtreecommitdiffstats
path: root/content/child/webfallbackthemeengine_impl.h
blob: aa100d6fff90bd4cf7a915708376812de411c3ad (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
35
36
37
38
39
// Copyright 2014 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 CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_
#define CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_

#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/public/platform/WebFallbackThemeEngine.h"

namespace content {

// This theme should only be used in layout tests in cases the mock theme can't
// handle (such as zoomed controls).
class WebFallbackThemeEngineImpl : public blink::WebFallbackThemeEngine {
 public:
  WebFallbackThemeEngineImpl();
  ~WebFallbackThemeEngineImpl();

  // WebFallbackThemeEngine methods:
  blink::WebSize getSize(blink::WebFallbackThemeEngine::Part) override;
  void paint(
      blink::WebCanvas* canvas,
      blink::WebFallbackThemeEngine::Part part,
      blink::WebFallbackThemeEngine::State state,
      const blink::WebRect& rect,
      const blink::WebFallbackThemeEngine::ExtraParams* extra_params) override;

 private:
  class WebFallbackNativeTheme;
  scoped_ptr<WebFallbackNativeTheme> theme_;

  DISALLOW_COPY_AND_ASSIGN(WebFallbackThemeEngineImpl);
};

}  // namespace content

#endif  // CONTENT_CHILD_WEBFALLBACKTHEMEENGINE_IMPL_H_