Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / common / extensions / extension_process_policy.h
blob7231c0f8ddec01ca870134e0720ef2920fffa946
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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_PROCESS_POLICY_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_PROCESS_POLICY_H_
8 class ExtensionSet;
9 class GURL;
11 namespace extensions {
13 class Extension;
15 // Returns the extension for the given URL. Excludes extension objects for
16 // bookmark apps, which do not use the app process model.
17 const Extension* GetNonBookmarkAppExtension(const ExtensionSet& extensions,
18 const GURL& url);
20 // Check if navigating a toplevel page from |old_url| to |new_url| would cross
21 // an extension process boundary (e.g. navigating from a web URL into an
22 // extension URL).
23 // We temporarily consider a workaround where we will keep non-app URLs in
24 // an app process, but only if |should_consider_workaround| is true. See
25 // http://crbug.com/59285.
26 bool CrossesExtensionProcessBoundary(
27 const ExtensionSet& extensions,
28 const GURL& old_url,
29 const GURL& new_url,
30 bool should_consider_workaround);
32 } // namespace extensions
34 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_PROCESS_POLICY_H_