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

Side by Side Diff: chrome/browser/extensions/extension_tab_util.h

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 years, 10 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 (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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 std::unique_ptr<bool> active; 51 std::unique_ptr<bool> active;
52 std::unique_ptr<bool> pinned; 52 std::unique_ptr<bool> pinned;
53 std::unique_ptr<int> index; 53 std::unique_ptr<int> index;
54 }; 54 };
55 55
56 // Opens a new tab given an extension function |function| and creation 56 // Opens a new tab given an extension function |function| and creation
57 // parameters |params|. Returns a Tab object if successful, or NULL and 57 // parameters |params|. Returns a Tab object if successful, or NULL and
58 // optionally sets |error| if an error occurs. 58 // optionally sets |error| if an error occurs.
59 static base::DictionaryValue* OpenTab(UIThreadExtensionFunction* function, 59 static base::DictionaryValue* OpenTab(UIThreadExtensionFunction* function,
60 const OpenTabParams& params, 60 const OpenTabParams& params,
61 bool user_gesture,
61 std::string* error); 62 std::string* error);
62 63
63 static int GetWindowId(const Browser* browser); 64 static int GetWindowId(const Browser* browser);
64 static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model); 65 static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model);
65 static int GetTabId(const content::WebContents* web_contents); 66 static int GetTabId(const content::WebContents* web_contents);
66 static std::string GetTabStatusText(bool is_loading); 67 static std::string GetTabStatusText(bool is_loading);
67 static int GetWindowIdOfTab(const content::WebContents* web_contents); 68 static int GetWindowIdOfTab(const content::WebContents* web_contents);
68 static std::unique_ptr<base::ListValue> CreateTabList( 69 static std::unique_ptr<base::ListValue> CreateTabList(
69 const Browser* browser, 70 const Browser* browser,
70 const Extension* extension); 71 const Extension* extension);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 static bool OpenOptionsPage(const Extension* extension, Browser* browser); 181 static bool OpenOptionsPage(const Extension* extension, Browser* browser);
181 182
182 // Returns true if the given Browser can report tabs to extensions. 183 // Returns true if the given Browser can report tabs to extensions.
183 // Example of Browsers which don't support tabs include apps and devtools. 184 // Example of Browsers which don't support tabs include apps and devtools.
184 static bool BrowserSupportsTabs(Browser* browser); 185 static bool BrowserSupportsTabs(Browser* browser);
185 }; 186 };
186 187
187 } // namespace extensions 188 } // namespace extensions
188 189
189 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ 190 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model_unittest.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698