| OLD | NEW |
| 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 <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "content/public/browser/web_contents_user_data.h" | 13 #include "content/public/browser/web_contents_user_data.h" |
| 14 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
| 15 | 15 |
| 16 class TabStripModel; | 16 class TabStripModel; |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class WebContents; | 19 class WebContents; |
| 20 } // namespace content | 20 } // namespace content |
| 21 | 21 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Returns the cached image, to be shown by the alert indicator button for mouse | 90 // Returns the cached image, to be shown by the alert indicator button for mouse |
| 91 // hover/pressed, when the indicator is in the given |alert_state|. Uses the | 91 // hover/pressed, when the indicator is in the given |alert_state|. Uses the |
| 92 // global ui::ResourceBundle shared instance. | 92 // global ui::ResourceBundle shared instance. |
| 93 gfx::Image GetTabAlertIndicatorAffordanceImage(TabAlertState alert_state, | 93 gfx::Image GetTabAlertIndicatorAffordanceImage(TabAlertState alert_state, |
| 94 SkColor button_color); | 94 SkColor button_color); |
| 95 | 95 |
| 96 // Returns a non-continuous Animation that performs a fade-in or fade-out | 96 // Returns a non-continuous Animation that performs a fade-in or fade-out |
| 97 // appropriate for the given |next_alert_state|. This is used by the tab alert | 97 // appropriate for the given |next_alert_state|. This is used by the tab alert |
| 98 // indicator to alert the user that recording, tab capture, or audio playback | 98 // indicator to alert the user that recording, tab capture, or audio playback |
| 99 // has started/stopped. | 99 // has started/stopped. |
| 100 scoped_ptr<gfx::Animation> CreateTabAlertIndicatorFadeAnimation( | 100 std::unique_ptr<gfx::Animation> CreateTabAlertIndicatorFadeAnimation( |
| 101 TabAlertState next_alert_state); | 101 TabAlertState next_alert_state); |
| 102 | 102 |
| 103 // Returns the text to show in a tab's tooltip: The contents |title|, followed | 103 // Returns the text to show in a tab's tooltip: The contents |title|, followed |
| 104 // by a break, followed by a localized string describing the |alert_state|. | 104 // by a break, followed by a localized string describing the |alert_state|. |
| 105 base::string16 AssembleTabTooltipText(const base::string16& title, | 105 base::string16 AssembleTabTooltipText(const base::string16& title, |
| 106 TabAlertState alert_state); | 106 TabAlertState alert_state); |
| 107 | 107 |
| 108 // Returns true if experimental audio mute controls (UI or extension API) are | 108 // Returns true if experimental audio mute controls (UI or extension API) are |
| 109 // enabled. Currently, toggling mute from a tab's context menu is the only | 109 // enabled. Currently, toggling mute from a tab's context menu is the only |
| 110 // non-experimental control method. | 110 // non-experimental control method. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 140 // string is returned. | 140 // string is returned. |
| 141 const std::string& GetExtensionIdForMutedTab(content::WebContents* contents); | 141 const std::string& GetExtensionIdForMutedTab(content::WebContents* contents); |
| 142 | 142 |
| 143 // Returns true if the tabs at the |indices| in |tab_strip| are all muted. | 143 // Returns true if the tabs at the |indices| in |tab_strip| are all muted. |
| 144 bool AreAllTabsMuted(const TabStripModel& tab_strip, | 144 bool AreAllTabsMuted(const TabStripModel& tab_strip, |
| 145 const std::vector<int>& indices); | 145 const std::vector<int>& indices); |
| 146 | 146 |
| 147 } // namespace chrome | 147 } // namespace chrome |
| 148 | 148 |
| 149 #endif // CHROME_BROWSER_UI_TABS_TAB_UTILS_H_ | 149 #endif // CHROME_BROWSER_UI_TABS_TAB_UTILS_H_ |
| OLD | NEW |