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_EXTENSIONS_EXTENSION_TAB_UTIL_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 static base::DictionaryValue* CreateTabValue( | 40 static base::DictionaryValue* CreateTabValue( |
41 const content::WebContents* web_contents); | 41 const content::WebContents* web_contents); |
42 static base::DictionaryValue* CreateTabValue( | 42 static base::DictionaryValue* CreateTabValue( |
43 const content::WebContents* web_contents, | 43 const content::WebContents* web_contents, |
44 TabStripModel* tab_strip, | 44 TabStripModel* tab_strip, |
45 int tab_index); | 45 int tab_index); |
46 // Create a tab value, overriding its kSelectedKey to the provided boolean. | 46 // Create a tab value, overriding its kSelectedKey to the provided boolean. |
47 static base::DictionaryValue* CreateTabValueActive( | 47 static base::DictionaryValue* CreateTabValueActive( |
48 const content::WebContents* web_contents, | 48 const content::WebContents* web_contents, |
49 bool active); | 49 bool active); |
50 static base::DictionaryValue* CreateWindowValue(const Browser* browser, | 50 |
51 bool populate_tabs); | |
52 // Gets the |tab_strip_model| and |tab_index| for the given |web_contents|. | 51 // Gets the |tab_strip_model| and |tab_index| for the given |web_contents|. |
53 static bool GetTabStripModel(const content::WebContents* web_contents, | 52 static bool GetTabStripModel(const content::WebContents* web_contents, |
54 TabStripModel** tab_strip_model, | 53 TabStripModel** tab_strip_model, |
55 int* tab_index); | 54 int* tab_index); |
56 static bool GetDefaultTab(Browser* browser, | 55 static bool GetDefaultTab(Browser* browser, |
57 TabContentsWrapper** contents, | 56 TabContentsWrapper** contents, |
58 int* tab_id); | 57 int* tab_id); |
59 // Any out parameter (|browser|, |tab_strip|, |contents|, & |tab_index|) may | 58 // Any out parameter (|browser|, |tab_strip|, |contents|, & |tab_index|) may |
60 // be NULL and will not be set within the function. | 59 // be NULL and will not be set within the function. |
61 static bool GetTabById(int tab_id, Profile* profile, bool incognito_enabled, | 60 static bool GetTabById(int tab_id, Profile* profile, bool incognito_enabled, |
62 Browser** browser, | 61 Browser** browser, |
63 TabStripModel** tab_strip, | 62 TabStripModel** tab_strip, |
64 TabContentsWrapper** contents, | 63 TabContentsWrapper** contents, |
65 int* tab_index); | 64 int* tab_index); |
66 }; | 65 }; |
67 | 66 |
68 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ | 67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ |
OLD | NEW |