OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TABS_TAB_STRIP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 6 #define CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 std::vector<int> GetIndicesClosedByCommand(int index, | 465 std::vector<int> GetIndicesClosedByCommand(int index, |
466 ContextMenuCommand id) const; | 466 ContextMenuCommand id) const; |
467 | 467 |
468 // Returns true if 'CommandTogglePinned' will pin. |index| is the index | 468 // Returns true if 'CommandTogglePinned' will pin. |index| is the index |
469 // supplied to |ExecuteContextMenuCommand|. | 469 // supplied to |ExecuteContextMenuCommand|. |
470 bool WillContextMenuPin(int index); | 470 bool WillContextMenuPin(int index); |
471 | 471 |
472 // Overridden from content::NotificationObserver: | 472 // Overridden from content::NotificationObserver: |
473 virtual void Observe(int type, | 473 virtual void Observe(int type, |
474 const content::NotificationSource& source, | 474 const content::NotificationSource& source, |
475 const content::NotificationDetails& details); | 475 const content::NotificationDetails& details) OVERRIDE; |
476 | 476 |
477 // Convert a ContextMenuCommand into a browser command. Returns true if a | 477 // Convert a ContextMenuCommand into a browser command. Returns true if a |
478 // corresponding browser command exists, false otherwise. | 478 // corresponding browser command exists, false otherwise. |
479 static bool ContextMenuCommandToBrowserCommand(int cmd_id, int* browser_cmd); | 479 static bool ContextMenuCommandToBrowserCommand(int cmd_id, int* browser_cmd); |
480 | 480 |
481 private: | 481 private: |
482 // Gets the set of tab indices whose domain matches the tab at |index|. | 482 // Gets the set of tab indices whose domain matches the tab at |index|. |
483 void GetIndicesWithSameDomain(int index, std::vector<int>* indices); | 483 void GetIndicesWithSameDomain(int index, std::vector<int>* indices); |
484 | 484 |
485 // Gets the set of tab indices that have the same opener as the tab at | 485 // Gets the set of tab indices that have the same opener as the tab at |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 653 |
654 // A scoped container for notification registries. | 654 // A scoped container for notification registries. |
655 content::NotificationRegistrar registrar_; | 655 content::NotificationRegistrar registrar_; |
656 | 656 |
657 TabStripSelectionModel selection_model_; | 657 TabStripSelectionModel selection_model_; |
658 | 658 |
659 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 659 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
660 }; | 660 }; |
661 | 661 |
662 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 662 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
OLD | NEW |