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

Side by Side Diff: chrome/browser/ui/tabs/tab_utils.h

Issue 2497373003: Add tab status to accessibility labels (Closed)
Patch Set: Created 4 years, 1 month 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_TABS_TAB_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_UTILS_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_UTILS_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_UTILS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 // #include "chrome/browser/ui/views/tabs/tab_renderer_data.h"
13 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
14 #include "third_party/skia/include/core/SkColor.h" 15 #include "third_party/skia/include/core/SkColor.h"
15 16
16 class TabStripModel; 17 class TabStripModel;
17 18
18 namespace content { 19 namespace content {
19 class WebContents; 20 class WebContents;
20 } // namespace content 21 } // namespace content
21 22
22 namespace gfx { 23 namespace gfx {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Returns a non-continuous Animation that performs a fade-in or fade-out 98 // Returns a non-continuous Animation that performs a fade-in or fade-out
98 // appropriate for the given |next_alert_state|. This is used by the tab alert 99 // appropriate for the given |next_alert_state|. This is used by the tab alert
99 // indicator to alert the user that recording, tab capture, or audio playback 100 // indicator to alert the user that recording, tab capture, or audio playback
100 // has started/stopped. 101 // has started/stopped.
101 std::unique_ptr<gfx::Animation> CreateTabAlertIndicatorFadeAnimation( 102 std::unique_ptr<gfx::Animation> CreateTabAlertIndicatorFadeAnimation(
102 TabAlertState next_alert_state); 103 TabAlertState next_alert_state);
103 104
104 // Returns the text to show in a tab's tooltip: The contents |title|, followed 105 // Returns the text to show in a tab's tooltip: The contents |title|, followed
105 // by a break, followed by a localized string describing the |alert_state|. 106 // by a break, followed by a localized string describing the |alert_state|.
106 base::string16 AssembleTabTooltipText(const base::string16& title, 107 base::string16 AssembleTabTooltipText(const base::string16& title,
107 TabAlertState alert_state); 108 TabAlertState alert_state,
109 int network_state);
108 110
109 // Returns true if experimental audio mute controls (UI or extension API) are 111 // Returns true if experimental audio mute controls (UI or extension API) are
110 // enabled. Currently, toggling mute from a tab's context menu is the only 112 // enabled. Currently, toggling mute from a tab's context menu is the only
111 // non-experimental control method. 113 // non-experimental control method.
112 bool AreExperimentalMuteControlsEnabled(); 114 bool AreExperimentalMuteControlsEnabled();
113 115
114 // Returns true if audio mute can be activated/deactivated for the given 116 // Returns true if audio mute can be activated/deactivated for the given
115 // |contents|. 117 // |contents|.
116 bool CanToggleAudioMute(content::WebContents* contents); 118 bool CanToggleAudioMute(content::WebContents* contents);
117 119
(...skipping 23 matching lines...) Expand all
141 // string is returned. 143 // string is returned.
142 const std::string& GetExtensionIdForMutedTab(content::WebContents* contents); 144 const std::string& GetExtensionIdForMutedTab(content::WebContents* contents);
143 145
144 // Returns true if the tabs at the |indices| in |tab_strip| are all muted. 146 // Returns true if the tabs at the |indices| in |tab_strip| are all muted.
145 bool AreAllTabsMuted(const TabStripModel& tab_strip, 147 bool AreAllTabsMuted(const TabStripModel& tab_strip,
146 const std::vector<int>& indices); 148 const std::vector<int>& indices);
147 149
148 } // namespace chrome 150 } // namespace chrome
149 151
150 #endif // CHROME_BROWSER_UI_TABS_TAB_UTILS_H_ 152 #endif // CHROME_BROWSER_UI_TABS_TAB_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698