Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/extensions/api/tabs/windows_util.h

Issue 1099553002: extensions: windows: list all windows from the current profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_API_TABS_WINDOWS_UTIL_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_WINDOWS_UTIL_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_WINDOWS_UTIL_H__ 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_WINDOWS_UTIL_H__
7 7
8 #include "chrome/browser/extensions/window_controller_list.h"
9
8 class UIThreadExtensionFunction; 10 class UIThreadExtensionFunction;
9 11
12 namespace content {
13 class BrowserContext;
14 }
15
10 namespace extensions { 16 namespace extensions {
17 class Extension;
11 class WindowController; 18 class WindowController;
12 } 19 }
13 20
14 namespace windows_util { 21 namespace windows_util {
15 22
16 // Populates |controller| for given |window_id|. If the window is not found, 23 // Populates |controller| for given |window_id|. If the window is not found,
17 // returns false and sets UIThreadExtensionFunction error_. 24 // returns false and sets UIThreadExtensionFunction error_.
18 bool GetWindowFromWindowID(UIThreadExtensionFunction* function, 25 bool GetWindowFromWindowID(UIThreadExtensionFunction* function,
19 int window_id, 26 int window_id,
27 extensions::WindowController::TypeFilter filter,
20 extensions::WindowController** controller); 28 extensions::WindowController** controller);
21 29
22 // Returns true if |function| (and the profile and extension that it was 30 // Returns true if |function| (and the profile and extension that it was
23 // invoked from) can operate on the window wrapped by |window_controller|. 31 // invoked from) can operate on the window wrapped by |window_controller|.
32 // If |all_window_types| is set this function will return true for any
33 // kind of window (including app and devtools), otherwise it will
34 // return true only for normal browser windows as well as windows
35 // created by the extension.
24 bool CanOperateOnWindow(const UIThreadExtensionFunction* function, 36 bool CanOperateOnWindow(const UIThreadExtensionFunction* function,
25 const extensions::WindowController* controller); 37 const extensions::WindowController* controller,
38 extensions::WindowController::TypeFilter filter);
26 39
27 } // namespace windows_util 40 } // namespace windows_util
28 41
29 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_WINDOWS_UTIL_H__ 42 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_WINDOWS_UTIL_H__
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/windows_event_router.cc ('k') | chrome/browser/extensions/api/tabs/windows_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698