OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 const base::string16& user_input, | 358 const base::string16& user_input, |
359 bool dialog_was_suppressed); | 359 bool dialog_was_suppressed); |
360 | 360 |
361 // Clears any outstanding transition request. This is called when we hear the | 361 // Clears any outstanding transition request. This is called when we hear the |
362 // response or commit. | 362 // response or commit. |
363 void ClearPendingTransitionRequestData(); | 363 void ClearPendingTransitionRequestData(); |
364 | 364 |
365 // Send a message to the renderer process to change the accessibility mode. | 365 // Send a message to the renderer process to change the accessibility mode. |
366 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); | 366 void SetAccessibilityMode(AccessibilityMode AccessibilityMode); |
367 | 367 |
368 // Request a one-time snapshot of the accessibility tree without changing | |
369 // the accessibility mode. | |
370 typedef base::Callback<void(const ui::AXTreeUpdate&)> | |
Charlie Reis
2015/04/02 23:09:06
Style nit: typedefs belong at the top.
http://goog
dmazzoni
2015/04/03 22:49:42
Done.
| |
371 AXTreeSnapshotCallback; | |
372 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); | |
373 | |
368 // Turn on accessibility testing. The given callback will be run | 374 // Turn on accessibility testing. The given callback will be run |
369 // every time an accessibility notification is received from the | 375 // every time an accessibility notification is received from the |
370 // renderer process, and the accessibility tree it sent can be | 376 // renderer process, and the accessibility tree it sent can be |
371 // retrieved using GetAXTreeForTesting(). | 377 // retrieved using GetAXTreeForTesting(). |
372 void SetAccessibilityCallbackForTesting( | 378 void SetAccessibilityCallbackForTesting( |
373 const base::Callback<void(ui::AXEvent, int)>& callback); | 379 const base::Callback<void(ui::AXEvent, int)>& callback); |
374 | 380 |
375 // Returns a snapshot of the accessibility tree received from the | 381 // Returns a snapshot of the accessibility tree received from the |
376 // renderer as of the last time an accessibility notification was | 382 // renderer as of the last time an accessibility notification was |
377 // received. | 383 // received. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
500 const BeginNavigationParams& begin_params, | 506 const BeginNavigationParams& begin_params, |
501 scoped_refptr<ResourceRequestBody> body); | 507 scoped_refptr<ResourceRequestBody> body); |
502 void OnDispatchLoad(); | 508 void OnDispatchLoad(); |
503 void OnAccessibilityEvents( | 509 void OnAccessibilityEvents( |
504 const std::vector<AccessibilityHostMsg_EventParams>& params, | 510 const std::vector<AccessibilityHostMsg_EventParams>& params, |
505 int reset_token); | 511 int reset_token); |
506 void OnAccessibilityLocationChanges( | 512 void OnAccessibilityLocationChanges( |
507 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); | 513 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
508 void OnAccessibilityFindInPageResult( | 514 void OnAccessibilityFindInPageResult( |
509 const AccessibilityHostMsg_FindInPageResultParams& params); | 515 const AccessibilityHostMsg_FindInPageResultParams& params); |
516 void OnAccessibilitySnapshotResponse(int token, | |
517 const ui::AXTreeUpdate& snapshot); | |
510 void OnToggleFullscreen(bool enter_fullscreen); | 518 void OnToggleFullscreen(bool enter_fullscreen); |
511 | 519 |
512 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 520 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
513 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 521 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
514 void OnHidePopup(); | 522 void OnHidePopup(); |
515 #endif | 523 #endif |
516 | 524 |
517 // Registers Mojo services that this frame host makes available. | 525 // Registers Mojo services that this frame host makes available. |
518 void RegisterMojoServices(); | 526 void RegisterMojoServices(); |
519 | 527 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
670 | 678 |
671 // This is nonzero if we sent an accessibility reset to the renderer and | 679 // This is nonzero if we sent an accessibility reset to the renderer and |
672 // we're waiting for an IPC containing this reset token (sequentially | 680 // we're waiting for an IPC containing this reset token (sequentially |
673 // assigned) and a complete replacement accessibility tree. | 681 // assigned) and a complete replacement accessibility tree. |
674 int accessibility_reset_token_; | 682 int accessibility_reset_token_; |
675 | 683 |
676 // A count of the number of times we needed to reset accessibility, so | 684 // A count of the number of times we needed to reset accessibility, so |
677 // we don't keep trying to reset forever. | 685 // we don't keep trying to reset forever. |
678 int accessibility_reset_count_; | 686 int accessibility_reset_count_; |
679 | 687 |
688 // The mapping of pending accessibility tree snapshot calls created by | |
689 // RequestAXTreeSnapshot and their corresponding callbacks. | |
Charlie Reis
2015/04/02 23:09:06
Please say what the key is.
dmazzoni
2015/04/03 22:49:42
Reworded. If this wording looks better, I can modi
| |
690 std::map<int, AXTreeSnapshotCallback> ax_tree_snapshot_callbacks_; | |
691 | |
680 // Callback when an event is received, for testing. | 692 // Callback when an event is received, for testing. |
681 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; | 693 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; |
682 // The most recently received accessibility tree - for testing only. | 694 // The most recently received accessibility tree - for testing only. |
683 scoped_ptr<ui::AXTree> ax_tree_for_testing_; | 695 scoped_ptr<ui::AXTree> ax_tree_for_testing_; |
684 // Flag to not create a BrowserAccessibilityManager, for testing. If one | 696 // Flag to not create a BrowserAccessibilityManager, for testing. If one |
685 // already exists it will still be used. | 697 // already exists it will still be used. |
686 bool no_create_browser_accessibility_manager_for_testing_; | 698 bool no_create_browser_accessibility_manager_for_testing_; |
687 | 699 |
688 // PlzNavigate: Owns the stream used in navigations to store the body of the | 700 // PlzNavigate: Owns the stream used in navigations to store the body of the |
689 // response once it has started. | 701 // response once it has started. |
690 scoped_ptr<StreamHandle> stream_handle_; | 702 scoped_ptr<StreamHandle> stream_handle_; |
691 | 703 |
692 // Context shared for each PermissionService instance created for this RFH. | 704 // Context shared for each PermissionService instance created for this RFH. |
693 scoped_ptr<PermissionServiceContext> permission_service_context_; | 705 scoped_ptr<PermissionServiceContext> permission_service_context_; |
694 | 706 |
695 // NOTE: This must be the last member. | 707 // NOTE: This must be the last member. |
696 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 708 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
697 | 709 |
698 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 710 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
699 }; | 711 }; |
700 | 712 |
701 } // namespace content | 713 } // namespace content |
702 | 714 |
703 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 715 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |