| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 bool has_keepalive; | 159 bool has_keepalive; |
| 160 | 160 |
| 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_COMPONENT: |
| 169 case VIEW_TYPE_EXTENSION_DIALOG: | 170 case VIEW_TYPE_EXTENSION_DIALOG: |
| 170 case VIEW_TYPE_EXTENSION_GUEST: | 171 case VIEW_TYPE_EXTENSION_GUEST: |
| 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 return true; | 176 return true; |
| 177 | 177 |
| 178 case VIEW_TYPE_INVALID: | 178 case VIEW_TYPE_INVALID: |
| 179 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: | 179 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: |
| 180 return false; | 180 return false; |
| 181 } | 181 } |
| 182 NOTREACHED(); | 182 NOTREACHED(); |
| 183 return false; | 183 return false; |
| 184 } | 184 } |
| 185 }; | 185 }; |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 if (extension && !IncognitoInfo::IsSplitMode(extension)) { | 977 if (extension && !IncognitoInfo::IsSplitMode(extension)) { |
| 978 BrowserContext* original_context = | 978 BrowserContext* original_context = |
| 979 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); | 979 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); |
| 980 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); | 980 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); |
| 981 } | 981 } |
| 982 | 982 |
| 983 return ProcessManager::GetSiteInstanceForURL(url); | 983 return ProcessManager::GetSiteInstanceForURL(url); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace extensions | 986 } // namespace extensions |
| OLD | NEW |