Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 2581023002: Add tab status to accessibility labels (Closed)
Patch Set: Add tab index check. Fixes ChromeVox crash. Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/ui/infobar_container_delegate.h" 25 #include "chrome/browser/ui/infobar_container_delegate.h"
26 #include "chrome/browser/ui/signin_view_controller.h" 26 #include "chrome/browser/ui/signin_view_controller.h"
27 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 27 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
28 #include "chrome/browser/ui/views/exclusive_access_bubble_views_context.h" 28 #include "chrome/browser/ui/views/exclusive_access_bubble_views_context.h"
29 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h" 29 #include "chrome/browser/ui/views/extensions/extension_keybinding_registry_views .h"
30 #include "chrome/browser/ui/views/frame/browser_frame.h" 30 #include "chrome/browser/ui/views/frame/browser_frame.h"
31 #include "chrome/browser/ui/views/frame/contents_web_view.h" 31 #include "chrome/browser/ui/views/frame/contents_web_view.h"
32 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 32 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
33 #include "chrome/browser/ui/views/frame/web_contents_close_handler.h" 33 #include "chrome/browser/ui/views/frame/web_contents_close_handler.h"
34 #include "chrome/browser/ui/views/load_complete_listener.h" 34 #include "chrome/browser/ui/views/load_complete_listener.h"
35 #include "chrome/browser/ui/views/tabs/tab.h"
36 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h"
35 #include "chrome/common/features.h" 37 #include "chrome/common/features.h"
36 #include "components/omnibox/browser/omnibox_popup_model_observer.h" 38 #include "components/omnibox/browser/omnibox_popup_model_observer.h"
37 #include "ui/base/accelerators/accelerator.h" 39 #include "ui/base/accelerators/accelerator.h"
38 #include "ui/base/models/simple_menu_model.h" 40 #include "ui/base/models/simple_menu_model.h"
39 #include "ui/gfx/native_widget_types.h" 41 #include "ui/gfx/native_widget_types.h"
40 #include "ui/views/controls/button/button.h" 42 #include "ui/views/controls/button/button.h"
41 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" 43 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
42 #include "ui/views/widget/widget_delegate.h" 44 #include "ui/views/widget/widget_delegate.h"
43 #include "ui/views/widget/widget_observer.h" 45 #include "ui/views/widget/widget_observer.h"
44 #include "ui/views/window/client_view.h" 46 #include "ui/views/window/client_view.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 gfx::NativeView GetBubbleParentView() const override; 461 gfx::NativeView GetBubbleParentView() const override;
460 gfx::Point GetCursorPointInParent() const override; 462 gfx::Point GetCursorPointInParent() const override;
461 gfx::Rect GetClientAreaBoundsInScreen() const override; 463 gfx::Rect GetClientAreaBoundsInScreen() const override;
462 bool IsImmersiveModeEnabled() override; 464 bool IsImmersiveModeEnabled() override;
463 gfx::Rect GetTopContainerBoundsInScreen() override; 465 gfx::Rect GetTopContainerBoundsInScreen() override;
464 466
465 // extension::ExtensionKeybindingRegistry::Delegate overrides 467 // extension::ExtensionKeybindingRegistry::Delegate overrides
466 extensions::ActiveTabPermissionGranter* GetActiveTabPermissionGranter() 468 extensions::ActiveTabPermissionGranter* GetActiveTabPermissionGranter()
467 override; 469 override;
468 470
471 // Creates an accessible tab label for screen readers that includes the tab
472 // status for the given tab index. This takes the form of
473 // "Page title - Tab state".
474 base::string16 GetAccessibleTabLabel(bool include_app_name, int index) const;
475
469 // Testing interface: 476 // Testing interface:
470 views::View* GetContentsContainerForTest() { return contents_container_; } 477 views::View* GetContentsContainerForTest() { return contents_container_; }
471 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; } 478 views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }
472 views::WebView* GetDevToolsWebViewForTest() { return devtools_web_view_; } 479 views::WebView* GetDevToolsWebViewForTest() { return devtools_web_view_; }
473 480
474 private: 481 private:
475 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate 482 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
476 // interface to keep these two classes decoupled and testable. 483 // interface to keep these two classes decoupled and testable.
477 friend class BrowserViewLayoutDelegateImpl; 484 friend class BrowserViewLayoutDelegateImpl;
478 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView); 485 FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // The class that registers for keyboard shortcuts for extension commands. 710 // The class that registers for keyboard shortcuts for extension commands.
704 std::unique_ptr<ExtensionKeybindingRegistryViews> 711 std::unique_ptr<ExtensionKeybindingRegistryViews>
705 extension_keybinding_registry_; 712 extension_keybinding_registry_;
706 713
707 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; 714 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_;
708 715
709 DISALLOW_COPY_AND_ASSIGN(BrowserView); 716 DISALLOW_COPY_AND_ASSIGN(BrowserView);
710 }; 717 };
711 718
712 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 719 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698