OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TABS_MODULE_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 static std::string GetTabStatusText(TabStatus status); | 32 static std::string GetTabStatusText(TabStatus status); |
33 static int GetWindowIdOfTab(const TabContents* tab_contents); | 33 static int GetWindowIdOfTab(const TabContents* tab_contents); |
34 static ListValue* CreateTabList(const Browser* browser); | 34 static ListValue* CreateTabList(const Browser* browser); |
35 static DictionaryValue* CreateTabValue(const TabContents* tab_contents); | 35 static DictionaryValue* CreateTabValue(const TabContents* tab_contents); |
36 static DictionaryValue* CreateTabValue(const TabContents* tab_contents, | 36 static DictionaryValue* CreateTabValue(const TabContents* tab_contents, |
37 TabStripModel* tab_strip, | 37 TabStripModel* tab_strip, |
38 int tab_index); | 38 int tab_index); |
39 static DictionaryValue* CreateWindowValue(const Browser* browser, | 39 static DictionaryValue* CreateWindowValue(const Browser* browser, |
40 bool populate_tabs); | 40 bool populate_tabs); |
41 | 41 |
| 42 static bool GetDefaultTab(Browser* browser, TabContents** contents, |
| 43 int* tab_id); |
42 // Any out parameter (|browser|, |tab_strip|, |contents|, & |tab_index|) may | 44 // Any out parameter (|browser|, |tab_strip|, |contents|, & |tab_index|) may |
43 // be NULL and will not be set within the function. | 45 // be NULL and will not be set within the function. |
44 static bool GetTabById(int tab_id, Profile* profile, Browser** browser, | 46 static bool GetTabById(int tab_id, Profile* profile, Browser** browser, |
45 TabStripModel** tab_strip, | 47 TabStripModel** tab_strip, |
46 TabContents** contents, | 48 TabContents** contents, |
47 int* tab_index); | 49 int* tab_index); |
48 }; | 50 }; |
49 | 51 |
50 // Windows | 52 // Windows |
51 class GetWindowFunction : public SyncExtensionFunction { | 53 class GetWindowFunction : public SyncExtensionFunction { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 virtual bool RunImpl(); | 89 virtual bool RunImpl(); |
88 }; | 90 }; |
89 class MoveTabFunction : public SyncExtensionFunction { | 91 class MoveTabFunction : public SyncExtensionFunction { |
90 virtual bool RunImpl(); | 92 virtual bool RunImpl(); |
91 }; | 93 }; |
92 class RemoveTabFunction : public SyncExtensionFunction { | 94 class RemoveTabFunction : public SyncExtensionFunction { |
93 virtual bool RunImpl(); | 95 virtual bool RunImpl(); |
94 }; | 96 }; |
95 class DetectTabLanguageFunction : public AsyncExtensionFunction, | 97 class DetectTabLanguageFunction : public AsyncExtensionFunction, |
96 public NotificationObserver { | 98 public NotificationObserver { |
| 99 private: |
97 virtual bool RunImpl(); | 100 virtual bool RunImpl(); |
98 | 101 |
99 private: | |
100 virtual void Observe(NotificationType type, | 102 virtual void Observe(NotificationType type, |
101 const NotificationSource& source, | 103 const NotificationSource& source, |
102 const NotificationDetails& details); | 104 const NotificationDetails& details); |
103 NotificationRegistrar registrar_; | 105 NotificationRegistrar registrar_; |
104 }; | 106 }; |
105 class CaptureVisibleTabFunction : public SyncExtensionFunction { | 107 class CaptureVisibleTabFunction : public SyncExtensionFunction { |
106 virtual bool RunImpl(); | 108 virtual bool RunImpl(); |
107 }; | 109 }; |
108 | 110 |
109 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ | 111 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ |
OLD | NEW |