Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 const gfx::Rect& paint_rect); | 68 const gfx::Rect& paint_rect); |
| 69 | 69 |
| 70 // Notifications about the view's progress painting. See PluginInstance. | 70 // Notifications about the view's progress painting. See PluginInstance. |
| 71 // These messages are used to send Flush callbacks to the plugin. | 71 // These messages are used to send Flush callbacks to the plugin. |
| 72 void ViewWillInitiatePaint(); | 72 void ViewWillInitiatePaint(); |
| 73 void ViewInitiatedPaint(); | 73 void ViewInitiatedPaint(); |
| 74 void ViewFlushedPaint(); | 74 void ViewFlushedPaint(); |
| 75 | 75 |
| 76 PPB_ImageData_Impl* image_data() { return image_data_.get(); } | 76 PPB_ImageData_Impl* image_data() { return image_data_.get(); } |
| 77 | 77 |
| 78 static bool ScaleMetrics(float scale, gfx::Rect& rect, int* dx, int* dy); | |
|
Wez
2012/07/19 01:33:37
gfx::Rect& -> gfx::Rect* since it's an in/out-para
Josh Horwich
2012/07/19 22:22:44
Done.
| |
| 79 | |
| 78 private: | 80 private: |
| 79 explicit PPB_Graphics2D_Impl(PP_Instance instance); | 81 explicit PPB_Graphics2D_Impl(PP_Instance instance); |
| 80 | 82 |
| 81 bool Init(int width, int height, bool is_always_opaque); | 83 bool Init(int width, int height, bool is_always_opaque); |
| 82 | 84 |
| 83 // Tracks a call to flush that requires a callback. | 85 // Tracks a call to flush that requires a callback. |
| 84 class FlushCallbackData { | 86 class FlushCallbackData { |
| 85 public: | 87 public: |
| 86 FlushCallbackData() { | 88 FlushCallbackData() { |
| 87 Clear(); | 89 Clear(); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 | 195 |
| 194 base::WeakPtrFactory<PPB_Graphics2D_Impl> weak_ptr_factory_; | 196 base::WeakPtrFactory<PPB_Graphics2D_Impl> weak_ptr_factory_; |
| 195 | 197 |
| 196 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl); | 198 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics2D_Impl); |
| 197 }; | 199 }; |
| 198 | 200 |
| 199 } // namespace ppapi | 201 } // namespace ppapi |
| 200 } // namespace webkit | 202 } // namespace webkit |
| 201 | 203 |
| 202 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ | 204 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_2D_IMPL_H_ |
| OLD | NEW |