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 CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 #endif | 386 #endif |
387 | 387 |
388 #if defined(OS_ANDROID) | 388 #if defined(OS_ANDROID) |
389 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); | 389 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); |
390 void DidCancelPopupMenu(); | 390 void DidCancelPopupMenu(); |
391 #endif | 391 #endif |
392 | 392 |
393 // User rotated the screen. Calls the "onorientationchange" Javascript hook. | 393 // User rotated the screen. Calls the "onorientationchange" Javascript hook. |
394 void SendOrientationChangeEvent(int orientation); | 394 void SendOrientationChangeEvent(int orientation); |
395 | 395 |
| 396 const std::string& frame_tree() const { |
| 397 return frame_tree_; |
| 398 } |
| 399 |
| 400 // Updates the frame tree for this RVH and sends an IPC down to the renderer |
| 401 // process to keep them in sync. For more details, see the comments on |
| 402 // ViewHostMsg_FrameTreeUpdated. |
| 403 void UpdateFrameTree(int process_id, |
| 404 int route_id, |
| 405 const std::string& frame_tree); |
| 406 |
396 void set_save_accessibility_tree_for_testing(bool save) { | 407 void set_save_accessibility_tree_for_testing(bool save) { |
397 save_accessibility_tree_for_testing_ = save; | 408 save_accessibility_tree_for_testing_ = save; |
398 } | 409 } |
399 | 410 |
400 void set_send_accessibility_updated_notifications(bool send) { | 411 void set_send_accessibility_updated_notifications(bool send) { |
401 send_accessibility_updated_notifications_ = send; | 412 send_accessibility_updated_notifications_ = send; |
402 } | 413 } |
403 | 414 |
404 const AccessibilityNodeData& accessibility_tree_for_testing() { | 415 const AccessibilityNodeData& accessibility_tree_for_testing() { |
405 return accessibility_tree_; | 416 return accessibility_tree_; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 bool has_audio, | 546 bool has_audio, |
536 bool is_playing); | 547 bool is_playing); |
537 void OnRequestDesktopNotificationPermission(const GURL& origin, | 548 void OnRequestDesktopNotificationPermission(const GURL& origin, |
538 int callback_id); | 549 int callback_id); |
539 void OnShowDesktopNotification( | 550 void OnShowDesktopNotification( |
540 const ShowDesktopNotificationHostMsgParams& params); | 551 const ShowDesktopNotificationHostMsgParams& params); |
541 void OnCancelDesktopNotification(int notification_id); | 552 void OnCancelDesktopNotification(int notification_id); |
542 void OnRunFileChooser(const FileChooserParams& params); | 553 void OnRunFileChooser(const FileChooserParams& params); |
543 void OnDomOperationResponse(const std::string& json_string, | 554 void OnDomOperationResponse(const std::string& json_string, |
544 int automation_id); | 555 int automation_id); |
| 556 void OnFrameTreeUpdated(const std::string& frame_tree); |
545 | 557 |
546 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 558 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
547 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); | 559 void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); |
548 #endif | 560 #endif |
549 | 561 |
550 #if defined(OS_ANDROID) | 562 #if defined(OS_ANDROID) |
551 void OnStartContentIntent(const GURL& content_url); | 563 void OnStartContentIntent(const GURL& content_url); |
552 #endif | 564 #endif |
553 | 565 |
554 private: | 566 private: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 // The session storage namespace to be used by the associated render view. | 642 // The session storage namespace to be used by the associated render view. |
631 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; | 643 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; |
632 | 644 |
633 // Whether the accessibility tree should be saved, for unit testing. | 645 // Whether the accessibility tree should be saved, for unit testing. |
634 bool save_accessibility_tree_for_testing_; | 646 bool save_accessibility_tree_for_testing_; |
635 | 647 |
636 // Whether accessibility notifications are sent for all WebKit notifications | 648 // Whether accessibility notifications are sent for all WebKit notifications |
637 // for unit testing. | 649 // for unit testing. |
638 bool send_accessibility_updated_notifications_; | 650 bool send_accessibility_updated_notifications_; |
639 | 651 |
| 652 // A JSON serialized representation of the frame tree for the current document |
| 653 // in the render view. For more details, see the comments on |
| 654 // ViewHostMsg_FrameTreeUpdated. |
| 655 std::string frame_tree_; |
| 656 |
640 // The most recently received accessibility tree - for unit testing only. | 657 // The most recently received accessibility tree - for unit testing only. |
641 AccessibilityNodeData accessibility_tree_; | 658 AccessibilityNodeData accessibility_tree_; |
642 | 659 |
643 // The termination status of the last render view that terminated. | 660 // The termination status of the last render view that terminated. |
644 base::TerminationStatus render_view_termination_status_; | 661 base::TerminationStatus render_view_termination_status_; |
645 | 662 |
646 // Holds PowerSaveBlockers for the media players in use. Key is the | 663 // Holds PowerSaveBlockers for the media players in use. Key is the |
647 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. | 664 // player_cookie passed to OnMediaNotification, value is the PowerSaveBlocker. |
648 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; | 665 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; |
649 PowerSaveBlockerMap power_save_blockers_; | 666 PowerSaveBlockerMap power_save_blockers_; |
650 | 667 |
651 // A list of observers that filter messages. Weak references. | 668 // A list of observers that filter messages. Weak references. |
652 ObserverList<RenderViewHostObserver> observers_; | 669 ObserverList<RenderViewHostObserver> observers_; |
653 | 670 |
654 // When the last ShouldClose message was sent. | 671 // When the last ShouldClose message was sent. |
655 base::TimeTicks send_should_close_start_time_; | 672 base::TimeTicks send_should_close_start_time_; |
656 | 673 |
657 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 674 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
658 }; | 675 }; |
659 | 676 |
660 #if defined(COMPILER_MSVC) | 677 #if defined(COMPILER_MSVC) |
661 #pragma warning(pop) | 678 #pragma warning(pop) |
662 #endif | 679 #endif |
663 | 680 |
664 } // namespace content | 681 } // namespace content |
665 | 682 |
666 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 683 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |