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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 ExtensionRenderViewData() | 203 ExtensionRenderViewData() |
204 : view_type(VIEW_TYPE_INVALID), has_keepalive(false) {} | 204 : view_type(VIEW_TYPE_INVALID), has_keepalive(false) {} |
205 | 205 |
206 // Returns whether the view can keep the lazy background page alive or not. | 206 // Returns whether the view can keep the lazy background page alive or not. |
207 bool CanKeepalive() const { | 207 bool CanKeepalive() const { |
208 switch (view_type) { | 208 switch (view_type) { |
209 case VIEW_TYPE_APP_WINDOW: | 209 case VIEW_TYPE_APP_WINDOW: |
210 case VIEW_TYPE_BACKGROUND_CONTENTS: | 210 case VIEW_TYPE_BACKGROUND_CONTENTS: |
211 case VIEW_TYPE_EXTENSION_DIALOG: | 211 case VIEW_TYPE_EXTENSION_DIALOG: |
212 case VIEW_TYPE_EXTENSION_INFOBAR: | |
213 case VIEW_TYPE_EXTENSION_POPUP: | 212 case VIEW_TYPE_EXTENSION_POPUP: |
214 case VIEW_TYPE_LAUNCHER_PAGE: | 213 case VIEW_TYPE_LAUNCHER_PAGE: |
215 case VIEW_TYPE_PANEL: | 214 case VIEW_TYPE_PANEL: |
216 case VIEW_TYPE_TAB_CONTENTS: | 215 case VIEW_TYPE_TAB_CONTENTS: |
217 case VIEW_TYPE_VIRTUAL_KEYBOARD: | 216 case VIEW_TYPE_VIRTUAL_KEYBOARD: |
218 return true; | 217 return true; |
219 | 218 |
220 case VIEW_TYPE_INVALID: | 219 case VIEW_TYPE_INVALID: |
221 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: | 220 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: |
222 return false; | 221 return false; |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 if (extension && !IncognitoInfo::IsSplitMode(extension)) { | 1037 if (extension && !IncognitoInfo::IsSplitMode(extension)) { |
1039 BrowserContext* original_context = | 1038 BrowserContext* original_context = |
1040 ExtensionsBrowserClient::Get()->GetOriginalContext(GetBrowserContext()); | 1039 ExtensionsBrowserClient::Get()->GetOriginalContext(GetBrowserContext()); |
1041 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); | 1040 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); |
1042 } | 1041 } |
1043 | 1042 |
1044 return ProcessManager::GetSiteInstanceForURL(url); | 1043 return ProcessManager::GetSiteInstanceForURL(url); |
1045 } | 1044 } |
1046 | 1045 |
1047 } // namespace extensions | 1046 } // namespace extensions |
OLD | NEW |