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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 static GURL ResolvePossiblyRelativeURL(const std::string& url_string, | 154 static GURL ResolvePossiblyRelativeURL(const std::string& url_string, |
155 const Extension* extension); | 155 const Extension* extension); |
156 | 156 |
157 // Returns true if |url| is used for testing crashes. | 157 // Returns true if |url| is used for testing crashes. |
158 static bool IsCrashURL(const GURL& url); | 158 static bool IsCrashURL(const GURL& url); |
159 | 159 |
160 // Opens a tab for the specified |web_contents|. | 160 // Opens a tab for the specified |web_contents|. |
161 static void CreateTab(content::WebContents* web_contents, | 161 static void CreateTab(content::WebContents* web_contents, |
162 const std::string& extension_id, | 162 const std::string& extension_id, |
163 WindowOpenDisposition disposition, | 163 WindowOpenDisposition disposition, |
164 const gfx::Rect& initial_pos, | 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. |
175 static void OpenOptionsPage(const Extension* extension, Browser* browser); | 175 static void OpenOptionsPage(const Extension* extension, Browser* browser); |
176 }; | 176 }; |
177 | 177 |
178 } // namespace extensions | 178 } // namespace extensions |
179 | 179 |
180 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ | 180 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ |
OLD | NEW |