Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: chrome/renderer/pepper_scrollbar_widget.h

Issue 6646025: Deleted WebPluginDelegatePepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_RENDERER_PEPPER_SCROLLBAR_WIDGET_H_
6 #define CHROME_RENDERER_PEPPER_SCROLLBAR_WIDGET_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "base/ref_counted.h"
12 #include "base/scoped_ptr.h"
13 #include "build/build_config.h"
14 #include "chrome/renderer/pepper_widget.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScrollbarClient.h"
17 #include "ui/gfx/point.h"
18 #include "ui/gfx/rect.h"
19
20 // An implementation of a horizontal/vertical scrollbar.
21 class PepperScrollbarWidget : public PepperWidget,
22 public WebKit::WebScrollbarClient,
23 public base::RefCounted<PepperScrollbarWidget> {
24 public:
25 explicit PepperScrollbarWidget(const NPScrollbarCreateParams& params);
26
27 // PepperWidget
28 virtual void Destroy();
29 virtual void Paint(Graphics2DDeviceContext* context, const NPRect& dirty);
30 virtual bool HandleEvent(const NPPepperEvent& event);
31 virtual void GetProperty(NPWidgetProperty property, void* value);
32 virtual void SetProperty(NPWidgetProperty property, void* value);
33
34 // WebKit::WebScrollbarClient
35 virtual void valueChanged(WebKit::WebScrollbar*);
36 virtual void invalidateScrollbarRect(WebKit::WebScrollbar*,
37 const WebKit::WebRect&);
38 virtual void getTickmarks(WebKit::WebScrollbar*,
39 WebKit::WebVector<WebKit::WebRect>*) const;
40
41 #if defined(OS_LINUX)
42 static void SetScrollbarColors(unsigned inactive_color,
43 unsigned active_color,
44 unsigned track_color);
45 #endif
46
47 private:
48 friend class base::RefCounted<PepperScrollbarWidget>;
49
50 ~PepperScrollbarWidget();
51
52 void NotifyInvalidate();
53
54 gfx::Rect dirty_rect_;
55 gfx::Rect location_;
56 std::vector<WebKit::WebRect> tickmarks_;
57 scoped_ptr<WebKit::WebScrollbar> scrollbar_;
58
59 DISALLOW_COPY_AND_ASSIGN(PepperScrollbarWidget);
60 };
61
62 #endif // CHROME_RENDERER_PEPPER_SCROLLBAR_WIDGET_H_
OLDNEW
« no previous file with comments | « chrome/renderer/pepper_devices_browsertest.cc ('k') | chrome/renderer/pepper_scrollbar_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698