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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 // Access the BrowserAccessibilityManager if it already exists. | 286 // Access the BrowserAccessibilityManager if it already exists. |
287 BrowserAccessibilityManager* browser_accessibility_manager() const { | 287 BrowserAccessibilityManager* browser_accessibility_manager() const { |
288 return browser_accessibility_manager_.get(); | 288 return browser_accessibility_manager_.get(); |
289 } | 289 } |
290 | 290 |
291 // If accessibility is enabled, get the BrowserAccessibilityManager for | 291 // If accessibility is enabled, get the BrowserAccessibilityManager for |
292 // this frame, or create one if it doesn't exist yet, otherwise return | 292 // this frame, or create one if it doesn't exist yet, otherwise return |
293 // NULL. | 293 // NULL. |
294 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); | 294 BrowserAccessibilityManager* GetOrCreateBrowserAccessibilityManager(); |
295 | 295 |
296 void set_disallow_browser_accessibility_manager_for_testing(bool flag) { | |
297 disallow_browser_accessibility_manager_for_testing_ = flag; | |
298 } | |
299 | |
296 #if defined(OS_WIN) | 300 #if defined(OS_WIN) |
297 void SetParentNativeViewAccessible( | 301 void SetParentNativeViewAccessible( |
298 gfx::NativeViewAccessible accessible_parent); | 302 gfx::NativeViewAccessible accessible_parent); |
299 gfx::NativeViewAccessible GetParentNativeViewAccessible() const; | 303 gfx::NativeViewAccessible GetParentNativeViewAccessible() const; |
300 #elif defined(OS_MACOSX) | 304 #elif defined(OS_MACOSX) |
301 // Select popup menu related methods (for external popup menus). | 305 // Select popup menu related methods (for external popup menus). |
302 void DidSelectPopupMenuItem(int selected_index); | 306 void DidSelectPopupMenuItem(int selected_index); |
303 void DidCancelPopupMenu(); | 307 void DidCancelPopupMenu(); |
304 #elif defined(OS_ANDROID) | 308 #elif defined(OS_ANDROID) |
305 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); | 309 void DidSelectPopupMenuItems(const std::vector<int>& selected_indices); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 void OnDidAccessInitialDocument(); | 375 void OnDidAccessInitialDocument(); |
372 void OnDidDisownOpener(); | 376 void OnDidDisownOpener(); |
373 void OnDidAssignPageId(int32 page_id); | 377 void OnDidAssignPageId(int32 page_id); |
374 void OnUpdateTitle(int32 page_id, | 378 void OnUpdateTitle(int32 page_id, |
375 const base::string16& title, | 379 const base::string16& title, |
376 blink::WebTextDirection title_direction); | 380 blink::WebTextDirection title_direction); |
377 void OnUpdateEncoding(const std::string& encoding); | 381 void OnUpdateEncoding(const std::string& encoding); |
378 void OnBeginNavigation( | 382 void OnBeginNavigation( |
379 const FrameHostMsg_BeginNavigation_Params& params); | 383 const FrameHostMsg_BeginNavigation_Params& params); |
380 void OnAccessibilityEvents( | 384 void OnAccessibilityEvents( |
381 const std::vector<AccessibilityHostMsg_EventParams>& params); | 385 const std::vector<AccessibilityHostMsg_EventParams>& params, |
386 bool is_reset); | |
382 void OnAccessibilityLocationChanges( | 387 void OnAccessibilityLocationChanges( |
383 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); | 388 const std::vector<AccessibilityHostMsg_LocationChangeParams>& params); |
384 | 389 |
385 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 390 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
386 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); | 391 void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); |
387 void OnHidePopup(); | 392 void OnHidePopup(); |
388 #endif | 393 #endif |
389 | 394 |
390 // Returns whether the given URL is allowed to commit in the current process. | 395 // Returns whether the given URL is allowed to commit in the current process. |
391 // This is a more conservative check than RenderProcessHost::FilterURL, since | 396 // This is a more conservative check than RenderProcessHost::FilterURL, since |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 // be one suspended navigation, because RenderFrameHostManager will destroy | 474 // be one suspended navigation, because RenderFrameHostManager will destroy |
470 // the pending RenderFrameHost and create a new one if a second navigation | 475 // the pending RenderFrameHost and create a new one if a second navigation |
471 // occurs. | 476 // occurs. |
472 scoped_ptr<FrameMsg_Navigate_Params> suspended_nav_params_; | 477 scoped_ptr<FrameMsg_Navigate_Params> suspended_nav_params_; |
473 | 478 |
474 // When the last BeforeUnload message was sent. | 479 // When the last BeforeUnload message was sent. |
475 base::TimeTicks send_before_unload_start_time_; | 480 base::TimeTicks send_before_unload_start_time_; |
476 | 481 |
477 ServiceRegistryImpl service_registry_; | 482 ServiceRegistryImpl service_registry_; |
478 | 483 |
484 // The object managing the accessibility tree for this frame. | |
479 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; | 485 scoped_ptr<BrowserAccessibilityManager> browser_accessibility_manager_; |
480 | 486 |
487 // True if we sent an accessibility reset to the renderer and we're | |
488 // waiting for a complete tree in response. | |
489 bool waiting_on_accessibility_reset_; | |
nasko
2014/10/02 16:38:48
It will be nice to think about whether all accessi
dmazzoni
2014/10/02 21:51:12
Sure, I've been thinking about this too. If you th
| |
490 | |
491 // A count of the number of times we needed to reset accessibility, so | |
492 // we don't keep trying to reset forever. | |
493 int accessibility_reset_count_; | |
494 | |
481 // Callback when an event is received, for testing. | 495 // Callback when an event is received, for testing. |
482 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; | 496 base::Callback<void(ui::AXEvent, int)> accessibility_testing_callback_; |
483 // The most recently received accessibility tree - for testing only. | 497 // The most recently received accessibility tree - for testing only. |
484 scoped_ptr<ui::AXTree> ax_tree_for_testing_; | 498 scoped_ptr<ui::AXTree> ax_tree_for_testing_; |
499 // Flag to not create a BrowserAccessibilityManager, for testing. | |
500 bool disallow_browser_accessibility_manager_for_testing_; | |
485 | 501 |
486 // NOTE: This must be the last member. | 502 // NOTE: This must be the last member. |
487 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 503 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
488 | 504 |
489 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 505 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
490 }; | 506 }; |
491 | 507 |
492 } // namespace content | 508 } // namespace content |
493 | 509 |
494 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 510 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |