| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // Access the BrowserAccessibilityManager if it already exists. | 332 // Access the BrowserAccessibilityManager if it already exists. |
| 333 BrowserAccessibilityManager* browser_accessibility_manager() const { | 333 BrowserAccessibilityManager* browser_accessibility_manager() const { |
| 334 return browser_accessibility_manager_.get(); | 334 return browser_accessibility_manager_.get(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 // If accessibility is enabled, get the BrowserAccessibilityManager for | 337 // If accessibility is enabled, get the BrowserAccessibilityManager for |
| 338 // this frame, or create one if it doesn't exist yet, otherwise return | 338 // this frame, or create one if it doesn't exist yet, otherwise return |
| 339 // NULL. | 339 // NULL. |
| 340 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); | 340 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); |
| 341 | 341 |
| 342 void set_disallow_browser_accessibility_manager_for_testing(bool flag) { |
| 343 disallow_browser_accessibility_manager_for_testing_ = flag; |
| 344 } |
| 345 |
| 342 #if defined(OS_WIN) | 346 #if defined(OS_WIN) |
| 343 void SetParentNativeViewAccessible( | 347 void SetParentNativeViewAccessible( |
| 344 gfx::NativeViewAccessible accessible_parent); | 348 gfx::NativeViewAccessible accessible_parent); |
| 345 gfx::NativeViewAccessible GetParentNativeViewAccessible() const; | 349 gfx::NativeViewAccessible GetParentNativeViewAccessible() const; |
| 346 #elif defined(OS_MACOSX) | 350 #elif defined(OS_MACOSX) |
| 347 // Select popup menu related methods (for external popup menus). | 351 // Select popup menu related methods (for external popup menus). |
| 348 void DidSelectPopupMenuItem(int selected_index); | 352 void DidSelectPopupMenuItem(int selected_index); |
| 349 void DidCancelPopupMenu(); | 353 void DidCancelPopupMenu(); |
| 350 #elif defined(OS_ANDROID) | 354 #elif defined(OS_ANDROID) |
| 351 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); | 355 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 void OnDidAccessInitialDocument(); | 427 void OnDidAccessInitialDocument(); |
| 424 void OnDidDisownOpener(); | 428 void OnDidDisownOpener(); |
| 425 void OnDidAssignPageId(int32 page_id); | 429 void OnDidAssignPageId(int32 page_id); |
| 426 void OnUpdateTitle(int32 page_id, | 430 void OnUpdateTitle(int32 page_id, |
| 427 const base::string16& title, | 431 const base::string16& title, |
| 428 blink::WebTextDirection title_direction); | 432 blink::WebTextDirection title_direction); |
| 429 void OnUpdateEncoding(const std::string& encoding); | 433 void OnUpdateEncoding(const std::string& encoding); |
| 430 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params, | 434 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params, |
| 431 const CommonNavigationParams& common_params); | 435 const CommonNavigationParams& common_params); |
| 432 void OnAccessibilityEvents( | 436 void OnAccessibilityEvents( |
| 433 const std::vector<AccessibilityHostMsg_EventParams>& params); | 437 const std::vector<AccessibilityHostMsg_EventParams>& params, |
| 438 int reset_token); |
| 434 void OnAccessibilityLocationChanges( | 439 void OnAccessibilityLocationChanges( |
| 435 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); | 440 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
| 436 | 441 |
| 437 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 442 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 438 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 443 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
| 439 void OnHidePopup(); | 444 void OnHidePopup(); |
| 440 #endif | 445 #endif |
| 441 | 446 |
| 442 // Updates the state of this RenderFrameHost and clears any waiting state | 447 // Updates the state of this RenderFrameHost and clears any waiting state |
| 443 // that is no longer relevant. | 448 // that is no longer relevant. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 // long to execute, depending on the number of active frames in the | 556 // long to execute, depending on the number of active frames in the |
| 552 // SiteInstance. | 557 // SiteInstance. |
| 553 scoped_ptr<TimeoutMonitor> swapout_event_monitor_timeout_; | 558 scoped_ptr<TimeoutMonitor> swapout_event_monitor_timeout_; |
| 554 | 559 |
| 555 // Called after receiving the SwapOutACK when the RFH is in the pending | 560 // Called after receiving the SwapOutACK when the RFH is in the pending |
| 556 // shutdown state. Also called if the unload timer times out. | 561 // shutdown state. Also called if the unload timer times out. |
| 557 base::Closure pending_shutdown_on_swap_out_; | 562 base::Closure pending_shutdown_on_swap_out_; |
| 558 | 563 |
| 559 ServiceRegistryImpl service_registry_; | 564 ServiceRegistryImpl service_registry_; |
| 560 | 565 |
| 566 // The object managing the accessibility tree for this frame. |
| 561 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | 567 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; |
| 562 | 568 |
| 569 // This is nonzero if we sent an accessibility reset to the renderer and |
| 570 // we're waiting for an IPC containing this reset token (randomly chosen) |
| 571 // and a complete replacement accessibility tree. |
| 572 int accessibility_reset_token_; |
| 573 |
| 574 // A count of the number of times we needed to reset accessibility, so |
| 575 // we don't keep trying to reset forever. |
| 576 int accessibility_reset_count_; |
| 577 |
| 563 // Callback when an event is received, for testing. | 578 // Callback when an event is received, for testing. |
| 564 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; | 579 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; |
| 565 // The most recently received accessibility tree - for testing only. | 580 // The most recently received accessibility tree - for testing only. |
| 566 scoped_ptr<ui::AXTree> ax_tree_for_testing_; | 581 scoped_ptr<ui::AXTree> ax_tree_for_testing_; |
| 582 // Flag to not create a BrowserAccessibilityManager, for testing. |
| 583 bool disallow_browser_accessibility_manager_for_testing_; |
| 567 | 584 |
| 568 // NOTE: This must be the last member. | 585 // NOTE: This must be the last member. |
| 569 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 586 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
| 570 | 587 |
| 571 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 588 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 572 }; | 589 }; |
| 573 | 590 |
| 574 } // namespace content | 591 } // namespace content |
| 575 | 592 |
| 576 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 593 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |