| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 const gfx::Rect& initial_rect, | 164 const gfx::Rect& initial_rect, |
| 165 bool user_gesture); | 165 bool user_gesture); |
| 166 | 166 |
| 167 // Executes the specified callback for all tabs in all browser windows. | 167 // Executes the specified callback for all tabs in all browser windows. |
| 168 static void ForEachTab( | 168 static void ForEachTab( |
| 169 const base::Callback<void(content::WebContents*)>& callback); | 169 const base::Callback<void(content::WebContents*)>& callback); |
| 170 | 170 |
| 171 static WindowController* GetWindowControllerOfTab( | 171 static WindowController* GetWindowControllerOfTab( |
| 172 const content::WebContents* web_contents); | 172 const content::WebContents* web_contents); |
| 173 | 173 |
| 174 // Open the extension's options page. | 174 // Open the extension's options page. Returns true if an options page was |
| 175 static void OpenOptionsPage(const Extension* extension, Browser* browser); | 175 // successfully opened (though it may not necessarily *load*, e.g. if the |
| 176 // URL does not exist). |
| 177 static bool OpenOptionsPage(const Extension* extension, Browser* browser); |
| 176 }; | 178 }; |
| 177 | 179 |
| 178 } // namespace extensions | 180 } // namespace extensions |
| 179 | 181 |
| 180 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ | 182 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ |
| OLD | NEW |