OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "apps/apps_client.h" | 5 #include "apps/apps_client.h" |
6 #include "apps/shell_window.h" | 6 #include "apps/shell_window.h" |
7 #include "apps/shell_window_registry.h" | 7 #include "apps/shell_window_registry.h" |
8 #include "apps/ui/native_app_window.h" | 8 #include "apps/ui/native_app_window.h" |
9 #include "chrome/browser/profiles/incognito_helpers.h" | 9 #include "chrome/browser/profiles/incognito_helpers.h" |
10 #include "chrome/common/extensions/extension.h" | |
11 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
12 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
13 #include "content/public/browser/devtools_agent_host.h" | 12 #include "content/public/browser/devtools_agent_host.h" |
14 #include "content/public/browser/devtools_manager.h" | 13 #include "content/public/browser/devtools_manager.h" |
15 #include "content/public/browser/render_process_host.h" | 14 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
17 #include "content/public/browser/site_instance.h" | 16 #include "content/public/browser/site_instance.h" |
18 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 18 #include "extensions/common/extension.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Create a key that identifies a ShellWindow in a RenderViewHost across App | 22 // Create a key that identifies a ShellWindow in a RenderViewHost across App |
23 // reloads. If the window was given an id in CreateParams, the key is the | 23 // reloads. If the window was given an id in CreateParams, the key is the |
24 // extension id, a colon separator, and the ShellWindow's |id|. If there is no | 24 // extension id, a colon separator, and the ShellWindow's |id|. If there is no |
25 // |id|, the chrome-extension://extension-id/page.html URL will be used. If the | 25 // |id|, the chrome-extension://extension-id/page.html URL will be used. If the |
26 // RenderViewHost is not for a ShellWindow, return an empty string. | 26 // RenderViewHost is not for a ShellWindow, return an empty string. |
27 std::string GetWindowKeyForRenderViewHost( | 27 std::string GetWindowKeyForRenderViewHost( |
28 const apps::ShellWindowRegistry* registry, | 28 const apps::ShellWindowRegistry* registry, |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const { | 299 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const { |
300 return false; | 300 return false; |
301 } | 301 } |
302 | 302 |
303 content::BrowserContext* ShellWindowRegistry::Factory::GetBrowserContextToUse( | 303 content::BrowserContext* ShellWindowRegistry::Factory::GetBrowserContextToUse( |
304 content::BrowserContext* context) const { | 304 content::BrowserContext* context) const { |
305 return chrome::GetBrowserContextRedirectedInIncognito(context); | 305 return chrome::GetBrowserContextRedirectedInIncognito(context); |
306 } | 306 } |
307 | 307 |
308 } // namespace extensions | 308 } // namespace extensions |
OLD | NEW |