Chromium Code Reviews| 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 "extensions/browser/process_manager.h" | 5 #include "extensions/browser/process_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 ExtensionRenderFrameData() | 161 ExtensionRenderFrameData() |
| 162 : view_type(VIEW_TYPE_INVALID), has_keepalive(false) {} | 162 : view_type(VIEW_TYPE_INVALID), has_keepalive(false) {} |
| 163 | 163 |
| 164 // Returns whether the view can keep the lazy background page alive or not. | 164 // Returns whether the view can keep the lazy background page alive or not. |
| 165 bool CanKeepalive() const { | 165 bool CanKeepalive() const { |
| 166 switch (view_type) { | 166 switch (view_type) { |
| 167 case VIEW_TYPE_APP_WINDOW: | 167 case VIEW_TYPE_APP_WINDOW: |
| 168 case VIEW_TYPE_BACKGROUND_CONTENTS: | 168 case VIEW_TYPE_BACKGROUND_CONTENTS: |
| 169 case VIEW_TYPE_EXTENSION_DIALOG: | 169 case VIEW_TYPE_EXTENSION_DIALOG: |
| 170 case VIEW_TYPE_EXTENSION_GUEST: | 170 case VIEW_TYPE_EXTENSION_GUEST: |
| 171 case VIEW_TYPE_EXTENSION_OTHER: | |
|
Devlin
2016/01/04 18:29:14
Having a pseudo-dummy tag have keepalive makes me
dmazzoni
2016/01/04 18:42:13
ChromeVox doesn't need this, so moved below.
| |
| 171 case VIEW_TYPE_EXTENSION_POPUP: | 172 case VIEW_TYPE_EXTENSION_POPUP: |
| 172 case VIEW_TYPE_LAUNCHER_PAGE: | 173 case VIEW_TYPE_LAUNCHER_PAGE: |
| 173 case VIEW_TYPE_PANEL: | 174 case VIEW_TYPE_PANEL: |
| 174 case VIEW_TYPE_TAB_CONTENTS: | 175 case VIEW_TYPE_TAB_CONTENTS: |
| 175 case VIEW_TYPE_VIRTUAL_KEYBOARD: | 176 case VIEW_TYPE_VIRTUAL_KEYBOARD: |
| 176 return true; | 177 return true; |
| 177 | 178 |
| 178 case VIEW_TYPE_INVALID: | 179 case VIEW_TYPE_INVALID: |
| 179 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: | 180 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: |
| 180 return false; | 181 return false; |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 977 if (extension && !IncognitoInfo::IsSplitMode(extension)) { | 978 if (extension && !IncognitoInfo::IsSplitMode(extension)) { |
| 978 BrowserContext* original_context = | 979 BrowserContext* original_context = |
| 979 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); | 980 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); |
| 980 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); | 981 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); |
| 981 } | 982 } |
| 982 | 983 |
| 983 return ProcessManager::GetSiteInstanceForURL(url); | 984 return ProcessManager::GetSiteInstanceForURL(url); |
| 984 } | 985 } |
| 985 | 986 |
| 986 } // namespace extensions | 987 } // namespace extensions |
| OLD | NEW |