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

Side by Side Diff: content/renderer/pepper/ppb_scrollbar_impl.h

Issue 20165002: Move webkit/plugins/ppapi to content/renderer/pepper. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: more more clang fun Created 7 years, 5 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/renderer/pepper/ppb_widget_impl.h"
13 #include "ppapi/thunk/ppb_scrollbar_api.h" 14 #include "ppapi/thunk/ppb_scrollbar_api.h"
14 #include "third_party/WebKit/public/platform/WebRect.h" 15 #include "third_party/WebKit/public/platform/WebRect.h"
15 #include "third_party/WebKit/public/web/WebPluginScrollbarClient.h" 16 #include "third_party/WebKit/public/web/WebPluginScrollbarClient.h"
16 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
17 #include "webkit/plugins/ppapi/ppb_widget_impl.h"
18 18
19 namespace webkit { 19 namespace webkit {
20 namespace ppapi { 20 namespace ppapi {
21 21
22 class PPB_Scrollbar_Impl : public PPB_Widget_Impl, 22 class PPB_Scrollbar_Impl : public PPB_Widget_Impl,
23 public ::ppapi::thunk::PPB_Scrollbar_API, 23 public ::ppapi::thunk::PPB_Scrollbar_API,
24 public WebKit::WebPluginScrollbarClient { 24 public WebKit::WebPluginScrollbarClient {
25 public: 25 public:
26 static PP_Resource Create(PP_Instance instance, bool vertical); 26 static PP_Resource Create(PP_Instance instance, bool vertical);
27 27
28 virtual ~PPB_Scrollbar_Impl();
29
30 // Resource overrides. 28 // Resource overrides.
31 virtual PPB_Scrollbar_API* AsPPB_Scrollbar_API() OVERRIDE; 29 virtual PPB_Scrollbar_API* AsPPB_Scrollbar_API() OVERRIDE;
32 virtual void InstanceWasDeleted(); 30 virtual void InstanceWasDeleted() OVERRIDE;
33 31
34 // PPB_Scrollbar_API implementation. 32 // PPB_Scrollbar_API implementation.
35 virtual uint32_t GetThickness() OVERRIDE; 33 virtual uint32_t GetThickness() OVERRIDE;
36 virtual bool IsOverlay() OVERRIDE; 34 virtual bool IsOverlay() OVERRIDE;
37 virtual uint32_t GetValue() OVERRIDE; 35 virtual uint32_t GetValue() OVERRIDE;
38 virtual void SetValue(uint32_t value) OVERRIDE; 36 virtual void SetValue(uint32_t value) OVERRIDE;
39 virtual void SetDocumentSize(uint32_t size) OVERRIDE; 37 virtual void SetDocumentSize(uint32_t size) OVERRIDE;
40 virtual void SetTickMarks(const PP_Rect* tick_marks, uint32_t count) OVERRIDE; 38 virtual void SetTickMarks(const PP_Rect* tick_marks, uint32_t count) OVERRIDE;
41 virtual void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) OVERRIDE; 39 virtual void ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) OVERRIDE;
42 40
43 private: 41 private:
42 virtual ~PPB_Scrollbar_Impl();
43
44 explicit PPB_Scrollbar_Impl(PP_Instance instance); 44 explicit PPB_Scrollbar_Impl(PP_Instance instance);
45 void Init(bool vertical); 45 void Init(bool vertical);
46 46
47 // PPB_Widget private implementation. 47 // PPB_Widget private implementation.
48 virtual PP_Bool PaintInternal(const gfx::Rect& rect, 48 virtual PP_Bool PaintInternal(const gfx::Rect& rect,
49 PPB_ImageData_Impl* image) OVERRIDE; 49 PPB_ImageData_Impl* image) OVERRIDE;
50 virtual PP_Bool HandleEventInternal( 50 virtual PP_Bool HandleEventInternal(
51 const ::ppapi::InputEventData& data) OVERRIDE; 51 const ::ppapi::InputEventData& data) OVERRIDE;
52 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; 52 virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE;
53 53
(...skipping 14 matching lines...) Expand all
68 68
69 // Used so that the post task for Invalidate doesn't keep an extra reference. 69 // Used so that the post task for Invalidate doesn't keep an extra reference.
70 base::WeakPtrFactory<PPB_Scrollbar_Impl> weak_ptr_factory_; 70 base::WeakPtrFactory<PPB_Scrollbar_Impl> weak_ptr_factory_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl); 72 DISALLOW_COPY_AND_ASSIGN(PPB_Scrollbar_Impl);
73 }; 73 };
74 74
75 } // namespace ppapi 75 } // namespace ppapi
76 } // namespace webkit 76 } // namespace webkit
77 77
78 #endif // WEBKIT_PLUGINS_PPAPI_PPB_SCROLLBAR_IMPL_H_ 78 #endif // CONTENT_RENDERER_PEPPER_PPB_SCROLLBAR_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_proxy_impl.cc ('k') | content/renderer/pepper/ppb_scrollbar_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698