OLD | NEW |
1 // Copyright (c) 2010 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 // This class is an implementation of the ChromotingView using Pepper devices | 5 // This class is an implementation of the ChromotingView using Pepper devices |
6 // as the backing stores. The public APIs to this class are thread-safe. | 6 // as the backing stores. This class is used only on pepper thread. |
7 // Calls will dispatch any interaction with the pepper API onto the pepper | 7 // Chromoting objects access this object through PepperViewProxy which |
8 // main thread. | 8 // delegates method calls on the pepper thread. |
9 // | |
10 // TODO(ajwong): We need to better understand the threading semantics of this | |
11 // class. Currently, we're just going to always run everything on the pepper | |
12 // main thread. Is this smart? | |
13 | 9 |
14 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 10 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
15 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 11 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
16 | 12 |
17 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
18 #include "base/task.h" | 14 #include "base/task.h" |
19 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
20 #include "ppapi/cpp/graphics_2d.h" | 16 #include "ppapi/cpp/graphics_2d.h" |
21 #include "remoting/client/chromoting_view.h" | 17 #include "remoting/client/chromoting_view.h" |
22 #include "remoting/client/frame_consumer.h" | 18 #include "remoting/client/frame_consumer.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 pp::Graphics2D graphics2d_; | 68 pp::Graphics2D graphics2d_; |
73 | 69 |
74 int viewport_x_; | 70 int viewport_x_; |
75 int viewport_y_; | 71 int viewport_y_; |
76 int viewport_width_; | 72 int viewport_width_; |
77 int viewport_height_; | 73 int viewport_height_; |
78 | 74 |
79 bool is_static_fill_; | 75 bool is_static_fill_; |
80 uint32 static_fill_color_; | 76 uint32 static_fill_color_; |
81 | 77 |
| 78 ScopedRunnableMethodFactory<PepperView> task_factory_; |
| 79 |
82 DISALLOW_COPY_AND_ASSIGN(PepperView); | 80 DISALLOW_COPY_AND_ASSIGN(PepperView); |
83 }; | 81 }; |
84 | 82 |
85 } // namespace remoting | 83 } // namespace remoting |
86 | 84 |
87 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperView); | |
88 | |
89 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 85 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
OLD | NEW |