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

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

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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) 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 #ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 uint32_t composition_selection_start; 48 uint32_t composition_selection_start;
49 uint32_t composition_selection_end; 49 uint32_t composition_selection_end;
50 }; 50 };
51 51
52 // This simple class implements the PPB_InputEvent_API in terms of the 52 // This simple class implements the PPB_InputEvent_API in terms of the
53 // shared InputEventData structure 53 // shared InputEventData structure
54 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared 54 class PPAPI_SHARED_EXPORT PPB_InputEvent_Shared
55 : public Resource, 55 : public Resource,
56 public thunk::PPB_InputEvent_API { 56 public thunk::PPB_InputEvent_API {
57 public: 57 public:
58 struct InitAsImpl {}; 58 PPB_InputEvent_Shared(ResourceObjectType type,
59 struct InitAsProxy {};
60
61 // The dummy arguments control which version of Resource's constructor is
62 // called for this base class.
63 PPB_InputEvent_Shared(const InitAsImpl&,
64 PP_Instance instance,
65 const InputEventData& data);
66 PPB_InputEvent_Shared(const InitAsProxy&,
67 PP_Instance instance, 59 PP_Instance instance,
68 const InputEventData& data); 60 const InputEventData& data);
69 61
70 // Resource overrides. 62 // Resource overrides.
71 virtual PPB_InputEvent_API* AsPPB_InputEvent_API() OVERRIDE; 63 virtual PPB_InputEvent_API* AsPPB_InputEvent_API() OVERRIDE;
72 64
73 // PPB_InputEvent_API implementation. 65 // PPB_InputEvent_API implementation.
74 virtual const InputEventData& GetInputEventData() const OVERRIDE; 66 virtual const InputEventData& GetInputEventData() const OVERRIDE;
75 virtual PP_InputEvent_Type GetType() OVERRIDE; 67 virtual PP_InputEvent_Type GetType() OVERRIDE;
76 virtual PP_TimeTicks GetTimeStamp() OVERRIDE; 68 virtual PP_TimeTicks GetTimeStamp() OVERRIDE;
(...skipping 14 matching lines...) Expand all
91 83
92 private: 84 private:
93 InputEventData data_; 85 InputEventData data_;
94 86
95 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared); 87 DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_InputEvent_Shared);
96 }; 88 };
97 89
98 } // namespace ppapi 90 } // namespace ppapi
99 91
100 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_ 92 #endif // PPAPI_SHARED_IMPL_PPB_INPUT_EVENT_SHARED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698