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

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

Issue 10175008: Improving the process model extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Schema file synced with docs, some minor cleanup. Created 8 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 | Annotate | Revision Log
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector>
10 11
11 class Browser; 12 class Browser;
12 class Extension; 13 class Extension;
13 class GURL; 14 class GURL;
14 class Profile; 15 class Profile;
15 class TabContentsWrapper; 16 class TabContentsWrapper;
16 class TabStripModel; 17 class TabStripModel;
17 18
18 namespace base { 19 namespace base {
19 class DictionaryValue; 20 class DictionaryValue;
20 class ListValue; 21 class ListValue;
22 class Value;
21 } 23 }
22 24
23 namespace content { 25 namespace content {
24 class WebContents; 26 class WebContents;
25 } 27 }
26 28
27 // Provides various utility functions that help manipulate tabs. 29 // Provides various utility functions that help manipulate tabs.
28 class ExtensionTabUtil { 30 class ExtensionTabUtil {
29 public: 31 public:
30 static int GetWindowId(const Browser* browser); 32 static int GetWindowId(const Browser* browser);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // provided so it can be resolved relative to its extension base 70 // provided so it can be resolved relative to its extension base
69 // (chrome-extension://<id>/). Using the source frame url would be more 71 // (chrome-extension://<id>/). Using the source frame url would be more
70 // correct, but because the api shipped with urls resolved relative to their 72 // correct, but because the api shipped with urls resolved relative to their
71 // extension base, we decided it wasn't worth breaking existing extensions to 73 // extension base, we decided it wasn't worth breaking existing extensions to
72 // fix. 74 // fix.
73 static GURL ResolvePossiblyRelativeURL(const std::string& url_string, 75 static GURL ResolvePossiblyRelativeURL(const std::string& url_string,
74 const Extension* extension); 76 const Extension* extension);
75 77
76 // Returns true if |url| is used for testing crashes. 78 // Returns true if |url| is used for testing crashes.
77 static bool IsCrashURL(const GURL& url); 79 static bool IsCrashURL(const GURL& url);
80
81 // Reads the |value| as either a single integer value or a list of integers.
82 static bool ReadOneOrMoreIntegers(base::Value* value,
83 std::vector<int>* result);
78 }; 84 };
79 85
80 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__ 86 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698