Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ | |
| 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 class TabContentsWrapper; | |
| 10 | |
| 11 namespace content { | |
| 12 class NavigationController; | |
|
sky
2012/03/05 16:30:56
nit: no spaces.
altimofeev
2012/03/07 21:01:39
Done.
| |
| 13 class WebContents; | |
| 14 } | |
| 15 | |
| 16 // Interface which provides simple functionality for accessing | |
| 17 // TabContentsWrapper instances. | |
| 18 class TabContentsWrapperContainer { | |
|
sky
2012/03/05 16:30:56
This name is overly generic. Is there a more speci
altimofeev
2012/03/07 21:01:39
No variant comes to my mind. Do you have a suggest
sky
2012/03/07 23:32:38
It's used by the toolbarmodel, so name it ToolbarM
| |
| 19 public: | |
| 20 TabContentsWrapperContainer() {} | |
|
tfarina
2012/03/05 17:30:24
nit: for pure abstract class (i.e, interface) you
altimofeev
2012/03/07 21:01:39
Done.
| |
| 21 virtual ~TabContentsWrapperContainer() {} | |
|
tfarina
2012/03/05 17:30:24
nit: is it possible to make this protected?
altimofeev
2012/03/07 21:01:39
Why do that?
sky
2012/03/07 23:32:38
A protected virtual destructor makes it clear that
| |
| 22 | |
| 23 // Count of TCWs in the container. | |
|
tfarina
2012/03/05 17:30:24
nit: // Returns the number of TCWs in this contain
altimofeev
2012/03/07 21:01:39
Done.
| |
| 24 virtual int tab_count() const = 0; | |
|
sky
2012/03/05 16:30:56
Doesn't use hacker_style for virtual methods. Addi
altimofeev
2012/03/05 17:13:24
Will fix hacker_style methods.
Concerning the com
| |
| 25 | |
| 26 // Index of the active TCW. | |
|
tfarina
2012/03/05 17:30:24
nit: // Returns the index of the active TCW.
altimofeev
2012/03/07 21:01:39
Done.
| |
| 27 virtual int active_index() const = 0; | |
| 28 | |
| 29 virtual int GetIndexOfController( | |
| 30 const content::NavigationController* controller) const = 0; | |
| 31 | |
| 32 // Returns active TCW. | |
| 33 // TODO(dpapad): Rename to GetActiveTabContentsWrapper(). | |
| 34 virtual TabContentsWrapper* GetSelectedTabContentsWrapper() const = 0; | |
| 35 | |
| 36 // A convenient version of the above which returns the TCW's WebContents. | |
| 37 virtual content::WebContents* GetSelectedWebContents() const = 0; | |
| 38 | |
| 39 // Returns TCW at specified index. | |
| 40 virtual TabContentsWrapper* GetTabContentsWrapperAt(int index) const = 0; | |
| 41 | |
| 42 // A convenient version of the above which returns the TCW's WebContents. | |
| 43 virtual content::WebContents* GetWebContentsAt(int index) const = 0; | |
| 44 | |
| 45 private: | |
| 46 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapperContainer); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ | |
| OLD | NEW |