| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // A delegate interface that the TabStripModel uses to perform work that it | 88 // A delegate interface that the TabStripModel uses to perform work that it |
| 89 // can't do itself, such as obtain a container HWND for creating new | 89 // can't do itself, such as obtain a container HWND for creating new |
| 90 // TabContents, creating new TabStripModels for detached tabs, etc. | 90 // TabContents, creating new TabStripModels for detached tabs, etc. |
| 91 // | 91 // |
| 92 // This interface is typically implemented by the controller that instantiates | 92 // This interface is typically implemented by the controller that instantiates |
| 93 // the TabStripModel (in our case the Browser object). | 93 // the TabStripModel (in our case the Browser object). |
| 94 // | 94 // |
| 95 /////////////////////////////////////////////////////////////////////////////// | 95 /////////////////////////////////////////////////////////////////////////////// |
| 96 class TabStripModelDelegate { | 96 class TabStripModelDelegate { |
| 97 public: | 97 public: |
| 98 // Retrieve the URL that should be used to construct blank tabs. |
| 99 virtual GURL GetBlankTabURL() const = 0; |
| 100 |
| 98 // Ask for a new TabStripModel to be created and the given tab contents to | 101 // Ask for a new TabStripModel to be created and the given tab contents to |
| 99 // be added to it. Its presentation (e.g. a browser window) anchored at the | 102 // be added to it. Its presentation (e.g. a browser window) anchored at the |
| 100 // specified creation point. It is left up to the delegate to decide how to | 103 // specified creation point. It is left up to the delegate to decide how to |
| 101 // size the window. ass an empty point (0, 0) to allow the delegate to decide | 104 // size the window. ass an empty point (0, 0) to allow the delegate to decide |
| 102 // where to position the window. | 105 // where to position the window. |
| 103 virtual void CreateNewStripWithContents(TabContents* contents, | 106 virtual void CreateNewStripWithContents(TabContents* contents, |
| 104 const gfx::Point& creation_point) = 0; | 107 const gfx::Point& creation_point) = 0; |
| 105 | 108 |
| 106 enum { | 109 enum { |
| 107 TAB_MOVE_ACTION = 1, | 110 TAB_MOVE_ACTION = 1, |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 | 530 |
| 528 // Our observers. | 531 // Our observers. |
| 529 typedef ObserverList<TabStripModelObserver> TabStripModelObservers; | 532 typedef ObserverList<TabStripModelObserver> TabStripModelObservers; |
| 530 TabStripModelObservers observers_; | 533 TabStripModelObservers observers_; |
| 531 | 534 |
| 532 DISALLOW_EVIL_CONSTRUCTORS(TabStripModel); | 535 DISALLOW_EVIL_CONSTRUCTORS(TabStripModel); |
| 533 }; | 536 }; |
| 534 | 537 |
| 535 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H__ | 538 #endif // CHROME_BROWSER_TABS_TAB_STRIP_MODEL_H__ |
| 536 | 539 |
| OLD | NEW |