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_STRIP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void SetTabBlocked(int index, bool blocked); | 318 void SetTabBlocked(int index, bool blocked); |
319 | 319 |
320 // Changes the pinned state of the tab at |index|. See description above | 320 // Changes the pinned state of the tab at |index|. See description above |
321 // class for details on this. | 321 // class for details on this. |
322 void SetTabPinned(int index, bool pinned); | 322 void SetTabPinned(int index, bool pinned); |
323 | 323 |
324 // Returns true if the tab at |index| is pinned. | 324 // Returns true if the tab at |index| is pinned. |
325 // See description above class for details on pinned tabs. | 325 // See description above class for details on pinned tabs. |
326 bool IsTabPinned(int index) const; | 326 bool IsTabPinned(int index) const; |
327 | 327 |
| 328 // Changes the muted audio state of the tab at |index|. |
| 329 void SetTabAudioMuted(int index, bool mute); |
| 330 |
| 331 // Returns true if the tab at |index| is muting its audio. |
| 332 bool IsTabAudioMuted(int index) const; |
| 333 |
328 // Is the tab a mini-tab? | 334 // Is the tab a mini-tab? |
329 // See description above class for details on this. | 335 // See description above class for details on this. |
330 bool IsMiniTab(int index) const; | 336 bool IsMiniTab(int index) const; |
331 | 337 |
332 // Is the tab at |index| an app? | 338 // Is the tab at |index| an app? |
333 // See description above class for details on app tabs. | 339 // See description above class for details on app tabs. |
334 bool IsAppTab(int index) const; | 340 bool IsAppTab(int index) const; |
335 | 341 |
336 // Returns true if the tab at |index| is blocked by a tab modal dialog. | 342 // Returns true if the tab at |index| is blocked by a tab modal dialog. |
337 bool IsTabBlocked(int index) const; | 343 bool IsTabBlocked(int index) const; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 enum ContextMenuCommand { | 411 enum ContextMenuCommand { |
406 CommandFirst = 0, | 412 CommandFirst = 0, |
407 CommandNewTab, | 413 CommandNewTab, |
408 CommandReload, | 414 CommandReload, |
409 CommandDuplicate, | 415 CommandDuplicate, |
410 CommandCloseTab, | 416 CommandCloseTab, |
411 CommandCloseOtherTabs, | 417 CommandCloseOtherTabs, |
412 CommandCloseTabsToRight, | 418 CommandCloseTabsToRight, |
413 CommandRestoreTab, | 419 CommandRestoreTab, |
414 CommandTogglePinned, | 420 CommandTogglePinned, |
| 421 CommandToggleTabAudioMuted, |
415 CommandBookmarkAllTabs, | 422 CommandBookmarkAllTabs, |
416 CommandSelectByDomain, | 423 CommandSelectByDomain, |
417 CommandSelectByOpener, | 424 CommandSelectByOpener, |
418 CommandLast | 425 CommandLast |
419 }; | 426 }; |
420 | 427 |
421 // Returns true if the specified command is enabled. If |context_index| is | 428 // Returns true if the specified command is enabled. If |context_index| is |
422 // selected the response applies to all selected tabs. | 429 // selected the response applies to all selected tabs. |
423 bool IsContextMenuCommandEnabled(int context_index, | 430 bool IsContextMenuCommandEnabled(int context_index, |
424 ContextMenuCommand command_id) const; | 431 ContextMenuCommand command_id) const; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 | 582 |
576 // TODO(sky): remove this; used for debugging 291265. | 583 // TODO(sky): remove this; used for debugging 291265. |
577 bool in_notify_; | 584 bool in_notify_; |
578 | 585 |
579 base::WeakPtrFactory<TabStripModel> weak_factory_; | 586 base::WeakPtrFactory<TabStripModel> weak_factory_; |
580 | 587 |
581 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 588 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
582 }; | 589 }; |
583 | 590 |
584 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 591 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
OLD | NEW |