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

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

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 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
« no previous file with comments | « ppapi/cpp/dev/fullscreen_dev.cc ('k') | ppapi/cpp/dev/message_loop_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ime_input_event_dev.h" 5 #include "ppapi/cpp/dev/ime_input_event_dev.h"
6 6
7 #include "ppapi/cpp/instance.h" 7 #include "ppapi/cpp/instance.h"
8 #include "ppapi/cpp/module.h" 8 #include "ppapi/cpp/module.h"
9 #include "ppapi/cpp/module_impl.h" 9 #include "ppapi/cpp/module_impl.h"
10 #include "ppapi/cpp/var.h" 10 #include "ppapi/cpp/var.h"
(...skipping 20 matching lines...) Expand all
31 if (get_interface<PPB_IMEInputEvent_Dev>()->IsIMEInputEvent( 31 if (get_interface<PPB_IMEInputEvent_Dev>()->IsIMEInputEvent(
32 event.pp_resource())) { 32 event.pp_resource())) {
33 Module::Get()->core()->AddRefResource(event.pp_resource()); 33 Module::Get()->core()->AddRefResource(event.pp_resource());
34 PassRefFromConstructor(event.pp_resource()); 34 PassRefFromConstructor(event.pp_resource());
35 } 35 }
36 } 36 }
37 37
38 Var IMEInputEvent_Dev::GetText() const { 38 Var IMEInputEvent_Dev::GetText() const {
39 if (!has_interface<PPB_IMEInputEvent_Dev>()) 39 if (!has_interface<PPB_IMEInputEvent_Dev>())
40 return Var(); 40 return Var();
41 return Var(Var::PassRef(), 41 return Var(PASS_REF,
42 get_interface<PPB_IMEInputEvent_Dev>()->GetText(pp_resource())); 42 get_interface<PPB_IMEInputEvent_Dev>()->GetText(pp_resource()));
43 } 43 }
44 44
45 uint32_t IMEInputEvent_Dev::GetSegmentNumber() const { 45 uint32_t IMEInputEvent_Dev::GetSegmentNumber() const {
46 if (!has_interface<PPB_IMEInputEvent_Dev>()) 46 if (!has_interface<PPB_IMEInputEvent_Dev>())
47 return 0; 47 return 0;
48 return get_interface<PPB_IMEInputEvent_Dev>()->GetSegmentNumber( 48 return get_interface<PPB_IMEInputEvent_Dev>()->GetSegmentNumber(
49 pp_resource()); 49 pp_resource());
50 } 50 }
51 51
(...skipping 16 matching lines...) Expand all
68 if (!has_interface<PPB_IMEInputEvent_Dev>()) 68 if (!has_interface<PPB_IMEInputEvent_Dev>())
69 return range; 69 return range;
70 get_interface<PPB_IMEInputEvent_Dev>()->GetSelection(pp_resource(), 70 get_interface<PPB_IMEInputEvent_Dev>()->GetSelection(pp_resource(),
71 &range.first, 71 &range.first,
72 &range.second); 72 &range.second);
73 return range; 73 return range;
74 } 74 }
75 75
76 76
77 } // namespace pp 77 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/fullscreen_dev.cc ('k') | ppapi/cpp/dev/message_loop_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698