OLD | NEW |
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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 bool SupportsPrintInterface(); | 223 bool SupportsPrintInterface(); |
224 bool IsPrintScalingDisabled(); | 224 bool IsPrintScalingDisabled(); |
225 int PrintBegin(const gfx::Rect& printable_area, int printer_dpi); | 225 int PrintBegin(const gfx::Rect& printable_area, int printer_dpi); |
226 bool PrintPage(int page_number, WebKit::WebCanvas* canvas); | 226 bool PrintPage(int page_number, WebKit::WebCanvas* canvas); |
227 void PrintEnd(); | 227 void PrintEnd(); |
228 | 228 |
229 void Graphics3DContextLost(); | 229 void Graphics3DContextLost(); |
230 | 230 |
231 // There are 2 implementations of the fullscreen interface | 231 // There are 2 implementations of the fullscreen interface |
232 // PPB_FlashFullscreen_Dev is used by Pepper Flash. | 232 // PPB_FlashFullscreen is used by Pepper Flash. |
233 // PPB_Fullscreen_Dev is intended for other applications including NaCl. | 233 // PPB_Fullscreen is intended for other applications including NaCl. |
234 // The two interface are mutually exclusive. | 234 // The two interface are mutually exclusive. |
235 | 235 |
236 // Implementation of PPB_FlashFullscreen. | 236 // Implementation of PPB_FlashFullscreen. |
237 | 237 |
238 // Because going to fullscreen is asynchronous (but going out is not), there | 238 // Because going to fullscreen is asynchronous (but going out is not), there |
239 // are 3 states: | 239 // are 3 states: |
240 // - normal : fullscreen_container_ == NULL | 240 // - normal : fullscreen_container_ == NULL |
241 // flash_fullscreen_ == false | 241 // flash_fullscreen_ == false |
242 // - fullscreen pending: fullscreen_container_ != NULL | 242 // - fullscreen pending: fullscreen_container_ != NULL |
243 // flash_fullscreen_ == false | 243 // flash_fullscreen_ == false |
(...skipping 10 matching lines...) Expand all Loading... |
254 // Switches between fullscreen and normal mode. If |delay_report| is set to | 254 // Switches between fullscreen and normal mode. If |delay_report| is set to |
255 // false, it may report the new state through DidChangeView immediately. If | 255 // false, it may report the new state through DidChangeView immediately. If |
256 // true, it will delay it. When called from the plugin, delay_report should be | 256 // true, it will delay it. When called from the plugin, delay_report should be |
257 // true to avoid re-entrancy. | 257 // true to avoid re-entrancy. |
258 void FlashSetFullscreen(bool fullscreen, bool delay_report); | 258 void FlashSetFullscreen(bool fullscreen, bool delay_report); |
259 | 259 |
260 FullscreenContainer* fullscreen_container() const { | 260 FullscreenContainer* fullscreen_container() const { |
261 return fullscreen_container_; | 261 return fullscreen_container_; |
262 } | 262 } |
263 | 263 |
264 // Implementation of PPB_Fullscreen_Dev. | 264 // Implementation of PPB_Fullscreen. |
265 | 265 |
266 // Because going to/from fullscreen is asynchronous, there are 4 states: | 266 // Because going to/from fullscreen is asynchronous, there are 4 states: |
267 // - normal : desired_fullscreen_state_ == false | 267 // - normal : desired_fullscreen_state_ == false |
268 // fullscreen_ == false | 268 // fullscreen_ == false |
269 // - fullscreen pending: desired_fullscreen_state_ == true | 269 // - fullscreen pending: desired_fullscreen_state_ == true |
270 // fullscreen_ == false | 270 // fullscreen_ == false |
271 // - fullscreen : desired_fullscreen_state_ == true | 271 // - fullscreen : desired_fullscreen_state_ == true |
272 // fullscreen_ == true | 272 // fullscreen_ == true |
273 // - normal pending : desired_fullscreen_state_ = false | 273 // - normal pending : desired_fullscreen_state_ = false |
274 // fullscreen_ = true | 274 // fullscreen_ = true |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 | 562 |
563 // Plugin container for fullscreen mode. NULL if not in fullscreen mode. Note: | 563 // Plugin container for fullscreen mode. NULL if not in fullscreen mode. Note: |
564 // there is a transition state where fullscreen_container_ is non-NULL but | 564 // there is a transition state where fullscreen_container_ is non-NULL but |
565 // flash_fullscreen_ is false (see above). | 565 // flash_fullscreen_ is false (see above). |
566 FullscreenContainer* fullscreen_container_; | 566 FullscreenContainer* fullscreen_container_; |
567 | 567 |
568 // True if we are in fullscreen mode. False if we are in normal mode or | 568 // True if we are in fullscreen mode. False if we are in normal mode or |
569 // in transition to fullscreen. | 569 // in transition to fullscreen. |
570 bool flash_fullscreen_; | 570 bool flash_fullscreen_; |
571 | 571 |
572 // Implementation of PPB_Fullscreen_Dev. | 572 // Implementation of PPB_Fullscreen. |
573 | 573 |
574 // Since entering fullscreen mode is an asynchronous operation, we set this | 574 // Since entering fullscreen mode is an asynchronous operation, we set this |
575 // variable to the desired state at the time we issue the fullscreen change | 575 // variable to the desired state at the time we issue the fullscreen change |
576 // request. The plugin will receive a DidChangeView event when it goes | 576 // request. The plugin will receive a DidChangeView event when it goes |
577 // fullscreen. | 577 // fullscreen. |
578 bool desired_fullscreen_state_; | 578 bool desired_fullscreen_state_; |
579 | 579 |
580 // True if we are in fullscreen mode. False if we are in normal mode. | 580 // True if we are in fullscreen mode. False if we are in normal mode. |
581 // It reflects the previous state when in transition. | 581 // It reflects the previous state when in transition. |
582 bool fullscreen_; | 582 bool fullscreen_; |
(...skipping 30 matching lines...) Expand all Loading... |
613 | 613 |
614 PP_CompletionCallback lock_mouse_callback_; | 614 PP_CompletionCallback lock_mouse_callback_; |
615 | 615 |
616 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 616 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
617 }; | 617 }; |
618 | 618 |
619 } // namespace ppapi | 619 } // namespace ppapi |
620 } // namespace webkit | 620 } // namespace webkit |
621 | 621 |
622 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 622 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |