Chromium Code Reviews| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 // returned object will contain privacy-sensitive data. | 63 // returned object will contain privacy-sensitive data. |
| 64 static base::DictionaryValue* CreateTabValue( | 64 static base::DictionaryValue* CreateTabValue( |
| 65 const content::WebContents* web_contents) { | 65 const content::WebContents* web_contents) { |
| 66 return CreateTabValue(web_contents, NULL, -1); | 66 return CreateTabValue(web_contents, NULL, -1); |
| 67 } | 67 } |
| 68 static base::DictionaryValue* CreateTabValue( | 68 static base::DictionaryValue* CreateTabValue( |
| 69 const content::WebContents* web_contents, | 69 const content::WebContents* web_contents, |
| 70 TabStripModel* tab_strip, | 70 TabStripModel* tab_strip, |
| 71 int tab_index); | 71 int tab_index); |
| 72 | 72 |
| 73 // Creates a Tab object with only the tab id for platform apps. | |
|
not at google - send to devlin
2014/01/23 16:41:59
If you did the filtering on the renderer would you
Lei Zhang
2014/01/23 20:53:12
If I did the filtering on the renderer side, then
| |
| 74 static base::DictionaryValue* CreateTabValueForPlatformApp( | |
| 75 const content::WebContents* web_contents); | |
| 76 | |
| 73 // Removes any privacy-sensitive fields from a Tab object if appropriate, | 77 // Removes any privacy-sensitive fields from a Tab object if appropriate, |
| 74 // given the permissions of the extension and the tab in question. The | 78 // given the permissions of the extension and the tab in question. The |
| 75 // tab_info object is modified in place. | 79 // tab_info object is modified in place. |
| 76 static void ScrubTabValueForExtension(const content::WebContents* contents, | 80 static void ScrubTabValueForExtension(const content::WebContents* contents, |
| 77 const Extension* extension, | 81 const Extension* extension, |
| 78 base::DictionaryValue* tab_info); | 82 base::DictionaryValue* tab_info); |
| 79 | 83 |
| 80 // Removes any privacy-sensitive fields from a Tab object if appropriate, | 84 // Removes any privacy-sensitive fields from a Tab object if appropriate, |
| 81 // given the permissions of the extension in question. | 85 // given the permissions of the extension in question. |
| 82 static void ScrubTabForExtension(const Extension* extension, | 86 static void ScrubTabForExtension(const Extension* extension, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 static WindowController* GetWindowControllerOfTab( | 129 static WindowController* GetWindowControllerOfTab( |
| 126 const content::WebContents* web_contents); | 130 const content::WebContents* web_contents); |
| 127 | 131 |
| 128 // Open the extension's options page. | 132 // Open the extension's options page. |
| 129 static void OpenOptionsPage(const Extension* extension, Browser* browser); | 133 static void OpenOptionsPage(const Extension* extension, Browser* browser); |
| 130 }; | 134 }; |
| 131 | 135 |
| 132 } // namespace extensions | 136 } // namespace extensions |
| 133 | 137 |
| 134 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ | 138 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H_ |
| OLD | NEW |