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

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

Issue 2858643002: PS - Filtering activeTab URL (Closed)
Patch Set: Created 3 years, 7 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 // Platform specific delegate. 56 // Platform specific delegate.
57 class Delegate { 57 class Delegate {
58 public: 58 public:
59 virtual ~Delegate() {} 59 virtual ~Delegate() {}
60 // Platform specific scrubbing of tab info for |extension|. 60 // Platform specific scrubbing of tab info for |extension|.
61 virtual void ScrubTabForExtension(const Extension* extension, 61 virtual void ScrubTabForExtension(const std::string& extension_id,
62 content::WebContents* contents,
63 api::tabs::Tab* tab) = 0; 62 api::tabs::Tab* tab) = 0;
64 }; 63 };
65 64
65 static void PlatformSpecificFiltering(const std::string& extension_id,
66 api::tabs::Tab* tab);
67
66 // Opens a new tab given an extension function |function| and creation 68 // Opens a new tab given an extension function |function| and creation
67 // parameters |params|. Returns a Tab object if successful, or NULL and 69 // parameters |params|. Returns a Tab object if successful, or NULL and
68 // optionally sets |error| if an error occurs. 70 // optionally sets |error| if an error occurs.
69 static base::DictionaryValue* OpenTab(UIThreadExtensionFunction* function, 71 static base::DictionaryValue* OpenTab(UIThreadExtensionFunction* function,
70 const OpenTabParams& params, 72 const OpenTabParams& params,
71 bool user_gesture, 73 bool user_gesture,
72 std::string* error); 74 std::string* error);
73 75
74 static int GetWindowId(const Browser* browser); 76 static int GetWindowId(const Browser* browser);
75 static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model); 77 static int GetWindowIdOfTabStripModel(const TabStripModel* tab_strip_model);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 static bool OpenOptionsPage(const Extension* extension, Browser* browser); 198 static bool OpenOptionsPage(const Extension* extension, Browser* browser);
197 199
198 // Returns true if the given Browser can report tabs to extensions. 200 // Returns true if the given Browser can report tabs to extensions.
199 // Example of Browsers which don't support tabs include apps and devtools. 201 // Example of Browsers which don't support tabs include apps and devtools.
200 static bool BrowserSupportsTabs(Browser* browser); 202 static bool BrowserSupportsTabs(Browser* browser);
201 }; 203 };
202 204
203 } // namespace extensions 205 } // namespace extensions
204 206
205 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ 207 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698