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_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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 // receive events from the fullscreen container, we go to the fullscreen | 259 // receive events from the fullscreen container, we go to the fullscreen |
260 // state. | 260 // state. |
261 bool FlashIsFullscreenOrPending(); | 261 bool FlashIsFullscreenOrPending(); |
262 | 262 |
263 // Switches between fullscreen and normal mode. If |delay_report| is set to | 263 // Switches between fullscreen and normal mode. If |delay_report| is set to |
264 // false, it may report the new state through DidChangeView immediately. If | 264 // false, it may report the new state through DidChangeView immediately. If |
265 // true, it will delay it. When called from the plugin, delay_report should | 265 // true, it will delay it. When called from the plugin, delay_report should |
266 // be true to avoid re-entrancy. | 266 // be true to avoid re-entrancy. |
267 void FlashSetFullscreen(bool fullscreen, bool delay_report); | 267 void FlashSetFullscreen(bool fullscreen, bool delay_report); |
268 | 268 |
| 269 // Updates |flash_fullscreen_| and sends focus change notification if |
| 270 // necessary. |
| 271 void UpdateFlashFullscreenState(bool flash_fullscreen); |
| 272 |
269 FullscreenContainer* fullscreen_container() const { | 273 FullscreenContainer* fullscreen_container() const { |
270 return fullscreen_container_; | 274 return fullscreen_container_; |
271 } | 275 } |
272 | 276 |
273 // Implementation of PPB_Fullscreen. | 277 // Implementation of PPB_Fullscreen. |
274 | 278 |
275 // Because going to/from fullscreen is asynchronous, there are 4 states: | 279 // Because going to/from fullscreen is asynchronous, there are 4 states: |
276 // - normal : desired_fullscreen_state_ == false | 280 // - normal : desired_fullscreen_state_ == false |
277 // view_data_.is_fullscreen == false | 281 // view_data_.is_fullscreen == false |
278 // - fullscreen pending: desired_fullscreen_state_ == true | 282 // - fullscreen pending: desired_fullscreen_state_ == true |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 bool LoadPdfInterface(); | 431 bool LoadPdfInterface(); |
428 bool LoadPrintInterface(); | 432 bool LoadPrintInterface(); |
429 bool LoadPrivateInterface(); | 433 bool LoadPrivateInterface(); |
430 bool LoadSelectionInterface(); | 434 bool LoadSelectionInterface(); |
431 bool LoadTextInputInterface(); | 435 bool LoadTextInputInterface(); |
432 bool LoadZoomInterface(); | 436 bool LoadZoomInterface(); |
433 | 437 |
434 // Determines if we think the plugin has focus, both content area and webkit | 438 // Determines if we think the plugin has focus, both content area and webkit |
435 // (see has_webkit_focus_ below). | 439 // (see has_webkit_focus_ below). |
436 bool PluginHasFocus() const; | 440 bool PluginHasFocus() const; |
| 441 void SendFocusChangeNotification(); |
437 | 442 |
438 // Returns true if the plugin has registered to accept touch events. | 443 // Returns true if the plugin has registered to accept touch events. |
439 bool IsAcceptingTouchEvents() const; | 444 bool IsAcceptingTouchEvents() const; |
440 | 445 |
441 void ScheduleAsyncDidChangeView(const ::ppapi::ViewData& previous_view); | 446 void ScheduleAsyncDidChangeView(const ::ppapi::ViewData& previous_view); |
442 void SendAsyncDidChangeView(const ::ppapi::ViewData& previous_view); | 447 void SendAsyncDidChangeView(const ::ppapi::ViewData& previous_view); |
443 void SendDidChangeView(const ::ppapi::ViewData& previous_view); | 448 void SendDidChangeView(const ::ppapi::ViewData& previous_view); |
444 | 449 |
445 // Reports the current plugin geometry to the plugin by calling | 450 // Reports the current plugin geometry to the plugin by calling |
446 // DidChangeView. | 451 // DidChangeView. |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 // the pointer so we can re-send it later if we are reset to talk to NaCl. | 676 // the pointer so we can re-send it later if we are reset to talk to NaCl. |
672 scoped_refptr<PPB_URLLoader_Impl> document_loader_; | 677 scoped_refptr<PPB_URLLoader_Impl> document_loader_; |
673 | 678 |
674 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 679 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
675 }; | 680 }; |
676 | 681 |
677 } // namespace ppapi | 682 } // namespace ppapi |
678 } // namespace webkit | 683 } // namespace webkit |
679 | 684 |
680 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 685 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |