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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 // command |id| for the tab at |index|. The returned indices are sorted in | 454 // command |id| for the tab at |index|. The returned indices are sorted in |
455 // descending order. | 455 // descending order. |
456 std::vector<int> GetIndicesClosedByCommand(int index, | 456 std::vector<int> GetIndicesClosedByCommand(int index, |
457 ContextMenuCommand id) const; | 457 ContextMenuCommand id) const; |
458 | 458 |
459 // Returns true if 'CommandTogglePinned' will pin. |index| is the index | 459 // Returns true if 'CommandTogglePinned' will pin. |index| is the index |
460 // supplied to |ExecuteContextMenuCommand|. | 460 // supplied to |ExecuteContextMenuCommand|. |
461 bool WillContextMenuPin(int index); | 461 bool WillContextMenuPin(int index); |
462 | 462 |
463 // Overridden from notificationObserver: | 463 // Overridden from notificationObserver: |
464 virtual void Observe(NotificationType type, | 464 virtual void Observe(int type, |
465 const NotificationSource& source, | 465 const NotificationSource& source, |
466 const NotificationDetails& details); | 466 const NotificationDetails& details); |
467 | 467 |
468 // Convert a ContextMenuCommand into a browser command. Returns true if a | 468 // Convert a ContextMenuCommand into a browser command. Returns true if a |
469 // corresponding browser command exists, false otherwise. | 469 // corresponding browser command exists, false otherwise. |
470 static bool ContextMenuCommandToBrowserCommand(int cmd_id, int* browser_cmd); | 470 static bool ContextMenuCommandToBrowserCommand(int cmd_id, int* browser_cmd); |
471 | 471 |
472 private: | 472 private: |
473 // Gets the set of tab indices whose domain matches the tab at |index|. | 473 // Gets the set of tab indices whose domain matches the tab at |index|. |
474 void GetIndicesWithSameDomain(int index, std::vector<int>* indices); | 474 void GetIndicesWithSameDomain(int index, std::vector<int>* indices); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 640 |
641 // A scoped container for notification registries. | 641 // A scoped container for notification registries. |
642 NotificationRegistrar registrar_; | 642 NotificationRegistrar registrar_; |
643 | 643 |
644 TabStripSelectionModel selection_model_; | 644 TabStripSelectionModel selection_model_; |
645 | 645 |
646 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 646 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
647 }; | 647 }; |
648 | 648 |
649 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ | 649 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H_ |
OLD | NEW |