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

Side by Side Diff: ppapi/cpp/dev/scrollbar_dev.cc

Issue 7538006: Pepper and WebKit API change to support a plugin knowing if a scrollbar is an overlay one. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and take out WebKit changes Created 9 years, 4 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
« no previous file with comments | « ppapi/cpp/dev/scrollbar_dev.h ('k') | ppapi/cpp/dev/widget_client_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 #include <vector> 5 #include <vector>
6 6
7 #include "ppapi/cpp/dev/scrollbar_dev.h" 7 #include "ppapi/cpp/dev/scrollbar_dev.h"
8 8
9 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
(...skipping 23 matching lines...) Expand all
34 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other) 34 Scrollbar_Dev::Scrollbar_Dev(const Scrollbar_Dev& other)
35 : Widget_Dev(other) { 35 : Widget_Dev(other) {
36 } 36 }
37 37
38 uint32_t Scrollbar_Dev::GetThickness() { 38 uint32_t Scrollbar_Dev::GetThickness() {
39 if (!has_interface<PPB_Scrollbar_Dev>()) 39 if (!has_interface<PPB_Scrollbar_Dev>())
40 return 0; 40 return 0;
41 return get_interface<PPB_Scrollbar_Dev>()->GetThickness(pp_resource()); 41 return get_interface<PPB_Scrollbar_Dev>()->GetThickness(pp_resource());
42 } 42 }
43 43
44 bool Scrollbar_Dev::IsOverlay() {
45 if (!has_interface<PPB_Scrollbar_Dev>())
46 return false;
47 return
48 PP_ToBool(get_interface<PPB_Scrollbar_Dev>()->IsOverlay(pp_resource()));
49 }
50
44 uint32_t Scrollbar_Dev::GetValue() { 51 uint32_t Scrollbar_Dev::GetValue() {
45 if (!has_interface<PPB_Scrollbar_Dev>()) 52 if (!has_interface<PPB_Scrollbar_Dev>())
46 return 0; 53 return 0;
47 return get_interface<PPB_Scrollbar_Dev>()->GetValue(pp_resource()); 54 return get_interface<PPB_Scrollbar_Dev>()->GetValue(pp_resource());
48 } 55 }
49 56
50 void Scrollbar_Dev::SetValue(uint32_t value) { 57 void Scrollbar_Dev::SetValue(uint32_t value) {
51 if (has_interface<PPB_Scrollbar_Dev>()) 58 if (has_interface<PPB_Scrollbar_Dev>())
52 get_interface<PPB_Scrollbar_Dev>()->SetValue(pp_resource(), value); 59 get_interface<PPB_Scrollbar_Dev>()->SetValue(pp_resource(), value);
53 } 60 }
(...skipping 17 matching lines...) Expand all
71 } 78 }
72 79
73 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) { 80 void Scrollbar_Dev::ScrollBy(PP_ScrollBy_Dev unit, int32_t multiplier) {
74 if (has_interface<PPB_Scrollbar_Dev>()) 81 if (has_interface<PPB_Scrollbar_Dev>())
75 get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(), 82 get_interface<PPB_Scrollbar_Dev>()->ScrollBy(pp_resource(),
76 unit, 83 unit,
77 multiplier); 84 multiplier);
78 } 85 }
79 86
80 } // namespace pp 87 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/scrollbar_dev.h ('k') | ppapi/cpp/dev/widget_client_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698