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

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

Issue 7237039: Remove PPBoolToBool and BoolToPPBool and use PP_FromBool and PP_ToBool instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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) 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 "ppapi/cpp/dev/widget_dev.h" 5 #include "ppapi/cpp/dev/widget_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_widget_dev.h" 7 #include "ppapi/c/dev/ppb_widget_dev.h"
8 #include "ppapi/cpp/common.h" 8 #include "ppapi/cpp/common.h"
9 #include "ppapi/cpp/image_data.h" 9 #include "ppapi/cpp/image_data.h"
10 #include "ppapi/cpp/instance.h" 10 #include "ppapi/cpp/instance.h"
(...skipping 13 matching lines...) Expand all
24 24
25 Widget_Dev::Widget_Dev(PP_Resource resource) : Resource(resource) { 25 Widget_Dev::Widget_Dev(PP_Resource resource) : Resource(resource) {
26 } 26 }
27 27
28 Widget_Dev::Widget_Dev(const Widget_Dev& other) : Resource(other) { 28 Widget_Dev::Widget_Dev(const Widget_Dev& other) : Resource(other) {
29 } 29 }
30 30
31 bool Widget_Dev::Paint(const Rect& rect, ImageData* image) { 31 bool Widget_Dev::Paint(const Rect& rect, ImageData* image) {
32 if (!has_interface<PPB_Widget_Dev>()) 32 if (!has_interface<PPB_Widget_Dev>())
33 return false; 33 return false;
34 return PPBoolToBool(get_interface<PPB_Widget_Dev>()->Paint( 34 return PP_ToBool(get_interface<PPB_Widget_Dev>()->Paint(
35 pp_resource(), &rect.pp_rect(), image->pp_resource())); 35 pp_resource(), &rect.pp_rect(), image->pp_resource()));
36 } 36 }
37 37
38 bool Widget_Dev::HandleEvent(const PP_InputEvent& event) { 38 bool Widget_Dev::HandleEvent(const PP_InputEvent& event) {
39 if (!has_interface<PPB_Widget_Dev>()) 39 if (!has_interface<PPB_Widget_Dev>())
40 return false; 40 return false;
41 return PPBoolToBool(get_interface<PPB_Widget_Dev>()->HandleEvent( 41 return PP_ToBool(get_interface<PPB_Widget_Dev>()->HandleEvent(
42 pp_resource(), &event)); 42 pp_resource(), &event));
43 } 43 }
44 44
45 bool Widget_Dev::GetLocation(Rect* location) { 45 bool Widget_Dev::GetLocation(Rect* location) {
46 if (!has_interface<PPB_Widget_Dev>()) 46 if (!has_interface<PPB_Widget_Dev>())
47 return false; 47 return false;
48 return PPBoolToBool(get_interface<PPB_Widget_Dev>()->GetLocation( 48 return PP_ToBool(get_interface<PPB_Widget_Dev>()->GetLocation(
49 pp_resource(), &location->pp_rect())); 49 pp_resource(), &location->pp_rect()));
50 } 50 }
51 51
52 void Widget_Dev::SetLocation(const Rect& location) { 52 void Widget_Dev::SetLocation(const Rect& location) {
53 if (has_interface<PPB_Widget_Dev>()) 53 if (has_interface<PPB_Widget_Dev>())
54 get_interface<PPB_Widget_Dev>()->SetLocation(pp_resource(), 54 get_interface<PPB_Widget_Dev>()->SetLocation(pp_resource(),
55 &location.pp_rect()); 55 &location.pp_rect());
56 } 56 }
57 57
58 } // namespace pp 58 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698