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

Side by Side Diff: ppapi/shared_impl/ppb_input_event_shared.cc

Issue 8826011: Remove PP_Module from parameters for PPB_Var.VarFromUtf8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years 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/shared_impl/ppb_file_ref_shared.cc ('k') | ppapi/shared_impl/ppb_url_util_shared.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/shared_impl/ppb_input_event_shared.h" 5 #include "ppapi/shared_impl/ppb_input_event_shared.h"
6 6
7 #include "ppapi/shared_impl/ppapi_globals.h"
8 #include "ppapi/shared_impl/var.h" 7 #include "ppapi/shared_impl/var.h"
9 8
10 using ppapi::thunk::PPB_InputEvent_API; 9 using ppapi::thunk::PPB_InputEvent_API;
11 10
12 namespace ppapi { 11 namespace ppapi {
13 12
14 InputEventData::InputEventData() 13 InputEventData::InputEventData()
15 : is_filtered(false), 14 : is_filtered(false),
16 event_type(PP_INPUTEVENT_TYPE_UNDEFINED), 15 event_type(PP_INPUTEVENT_TYPE_UNDEFINED),
17 event_time_stamp(0.0), 16 event_time_stamp(0.0),
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 92
94 PP_Bool PPB_InputEvent_Shared::GetWheelScrollByPage() { 93 PP_Bool PPB_InputEvent_Shared::GetWheelScrollByPage() {
95 return PP_FromBool(data_.wheel_scroll_by_page); 94 return PP_FromBool(data_.wheel_scroll_by_page);
96 } 95 }
97 96
98 uint32_t PPB_InputEvent_Shared::GetKeyCode() { 97 uint32_t PPB_InputEvent_Shared::GetKeyCode() {
99 return data_.key_code; 98 return data_.key_code;
100 } 99 }
101 100
102 PP_Var PPB_InputEvent_Shared::GetCharacterText() { 101 PP_Var PPB_InputEvent_Shared::GetCharacterText() {
103 return StringVar::StringToPPVar( 102 return StringVar::StringToPPVar(data_.character_text);
104 PpapiGlobals::Get()->GetModuleForInstance(pp_instance()),
105 data_.character_text);
106 } 103 }
107 104
108 uint32_t PPB_InputEvent_Shared::GetIMESegmentNumber() { 105 uint32_t PPB_InputEvent_Shared::GetIMESegmentNumber() {
109 if (data_.composition_segment_offsets.empty()) 106 if (data_.composition_segment_offsets.empty())
110 return 0; 107 return 0;
111 return data_.composition_segment_offsets.size() - 1; 108 return data_.composition_segment_offsets.size() - 1;
112 } 109 }
113 110
114 uint32_t PPB_InputEvent_Shared::GetIMESegmentOffset(uint32_t index) { 111 uint32_t PPB_InputEvent_Shared::GetIMESegmentOffset(uint32_t index) {
115 if (index >= data_.composition_segment_offsets.size()) 112 if (index >= data_.composition_segment_offsets.size())
116 return 0; 113 return 0;
117 return data_.composition_segment_offsets[index]; 114 return data_.composition_segment_offsets[index];
118 } 115 }
119 116
120 int32_t PPB_InputEvent_Shared::GetIMETargetSegment() { 117 int32_t PPB_InputEvent_Shared::GetIMETargetSegment() {
121 return data_.composition_target_segment; 118 return data_.composition_target_segment;
122 } 119 }
123 120
124 void PPB_InputEvent_Shared::GetIMESelection(uint32_t* start, uint32_t* end) { 121 void PPB_InputEvent_Shared::GetIMESelection(uint32_t* start, uint32_t* end) {
125 if (start) 122 if (start)
126 *start = data_.composition_selection_start; 123 *start = data_.composition_selection_start;
127 if (end) 124 if (end)
128 *end = data_.composition_selection_end; 125 *end = data_.composition_selection_end;
129 } 126 }
130 127
131 } // namespace ppapi 128 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_file_ref_shared.cc ('k') | ppapi/shared_impl/ppb_url_util_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698