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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
415 const std::string& frame_tree); | 415 const std::string& frame_tree); |
416 | 416 |
417 void set_save_accessibility_tree_for_testing(bool save) { | 417 void set_save_accessibility_tree_for_testing(bool save) { |
418 save_accessibility_tree_for_testing_ = save; | 418 save_accessibility_tree_for_testing_ = save; |
419 } | 419 } |
420 | 420 |
421 const AccessibilityNodeData& accessibility_tree_for_testing() { | 421 const AccessibilityNodeData& accessibility_tree_for_testing() { |
422 return accessibility_tree_; | 422 return accessibility_tree_; |
423 } | 423 } |
424 | 424 |
425 // Add/remove accessibility callbacks (only for testing). | |
426 void AddAccessibilityLayoutCompleteCallbackForTesting( | |
427 const base::Closure& callback); | |
428 void RemoveAccessibilityLayoutCompleteCallbackForTesting( | |
429 const base::Closure& callback); | |
430 void AddAccessibilityLoadCompleteCallbackForTesting( | |
431 const base::Closure& callback); | |
432 void RemoveAccessibilityLoadCompleteCallbackForTesting( | |
433 const base::Closure& callback); | |
434 | |
425 bool is_waiting_for_unload_ack_for_testing() { | 435 bool is_waiting_for_unload_ack_for_testing() { |
426 return is_waiting_for_unload_ack_; | 436 return is_waiting_for_unload_ack_; |
427 } | 437 } |
428 | 438 |
429 // Checks that the given renderer can request |url|, if not it sets it to | 439 // Checks that the given renderer can request |url|, if not it sets it to |
430 // about:blank. | 440 // about:blank. |
431 // empty_allowed must be set to false for navigations for security reasons. | 441 // empty_allowed must be set to false for navigations for security reasons. |
432 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, | 442 static void FilterURL(ChildProcessSecurityPolicyImpl* policy, |
433 const RenderProcessHost* process, | 443 const RenderProcessHost* process, |
434 bool empty_allowed, | 444 bool empty_allowed, |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
645 // the case of a cross-site transition ( = true). | 655 // the case of a cross-site transition ( = true). |
646 bool unload_ack_is_for_cross_site_transition_; | 656 bool unload_ack_is_for_cross_site_transition_; |
647 | 657 |
648 bool are_javascript_messages_suppressed_; | 658 bool are_javascript_messages_suppressed_; |
649 | 659 |
650 // The mapping of pending javascript calls created by | 660 // The mapping of pending javascript calls created by |
651 // ExecuteJavascriptInWebFrameCallbackResult and their corresponding | 661 // ExecuteJavascriptInWebFrameCallbackResult and their corresponding |
652 // callbacks. | 662 // callbacks. |
653 std::map<int, JavascriptResultCallback> javascript_callbacks_; | 663 std::map<int, JavascriptResultCallback> javascript_callbacks_; |
654 | 664 |
665 // Accessibility callbacks. | |
666 std::vector<base::Closure> accessibility_layout_callbacks_; | |
dmazzoni
2013/02/12 16:00:52
I can't imagine we'll ever need more than one call
jam
2013/02/12 17:48:18
+1
| |
667 std::vector<base::Closure> accessibility_load_callbacks_; | |
668 | |
655 // True if the render view can be shut down suddenly. | 669 // True if the render view can be shut down suddenly. |
656 bool sudden_termination_allowed_; | 670 bool sudden_termination_allowed_; |
657 | 671 |
658 // The session storage namespace to be used by the associated render view. | 672 // The session storage namespace to be used by the associated render view. |
659 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; | 673 scoped_refptr<SessionStorageNamespaceImpl> session_storage_namespace_; |
660 | 674 |
661 // Whether the accessibility tree should be saved, for unit testing. | 675 // Whether the accessibility tree should be saved, for unit testing. |
662 bool save_accessibility_tree_for_testing_; | 676 bool save_accessibility_tree_for_testing_; |
663 | 677 |
664 // A JSON serialized representation of the frame tree for the current document | 678 // A JSON serialized representation of the frame tree for the current document |
(...skipping 27 matching lines...) Expand all Loading... | |
692 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); | 706 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImpl); |
693 }; | 707 }; |
694 | 708 |
695 #if defined(COMPILER_MSVC) | 709 #if defined(COMPILER_MSVC) |
696 #pragma warning(pop) | 710 #pragma warning(pop) |
697 #endif | 711 #endif |
698 | 712 |
699 } // namespace content | 713 } // namespace content |
700 | 714 |
701 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ | 715 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_IMPL_H_ |
OLD | NEW |