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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 ExtensionRenderFrameData() | 160 ExtensionRenderFrameData() |
161 : view_type(VIEW_TYPE_INVALID), has_keepalive(false) {} | 161 : view_type(VIEW_TYPE_INVALID), has_keepalive(false) {} |
162 | 162 |
163 // Returns whether the view can keep the lazy background page alive or not. | 163 // Returns whether the view can keep the lazy background page alive or not. |
164 bool CanKeepalive() const { | 164 bool CanKeepalive() const { |
165 switch (view_type) { | 165 switch (view_type) { |
166 case VIEW_TYPE_APP_WINDOW: | 166 case VIEW_TYPE_APP_WINDOW: |
167 case VIEW_TYPE_BACKGROUND_CONTENTS: | 167 case VIEW_TYPE_BACKGROUND_CONTENTS: |
168 case VIEW_TYPE_EXTENSION_DIALOG: | 168 case VIEW_TYPE_EXTENSION_DIALOG: |
169 case VIEW_TYPE_EXTENSION_POPUP: | 169 case VIEW_TYPE_EXTENSION_POPUP: |
| 170 case VIEW_TYPE_EXTENSION_SIDEBAR: |
170 case VIEW_TYPE_LAUNCHER_PAGE: | 171 case VIEW_TYPE_LAUNCHER_PAGE: |
171 case VIEW_TYPE_PANEL: | 172 case VIEW_TYPE_PANEL: |
172 case VIEW_TYPE_TAB_CONTENTS: | 173 case VIEW_TYPE_TAB_CONTENTS: |
173 case VIEW_TYPE_VIRTUAL_KEYBOARD: | 174 case VIEW_TYPE_VIRTUAL_KEYBOARD: |
174 return true; | 175 return true; |
175 | 176 |
176 case VIEW_TYPE_INVALID: | 177 case VIEW_TYPE_INVALID: |
177 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: | 178 case VIEW_TYPE_EXTENSION_BACKGROUND_PAGE: |
178 return false; | 179 return false; |
179 } | 180 } |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 if (extension && !IncognitoInfo::IsSplitMode(extension)) { | 952 if (extension && !IncognitoInfo::IsSplitMode(extension)) { |
952 BrowserContext* original_context = | 953 BrowserContext* original_context = |
953 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); | 954 ExtensionsBrowserClient::Get()->GetOriginalContext(browser_context()); |
954 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); | 955 return ProcessManager::Get(original_context)->GetSiteInstanceForURL(url); |
955 } | 956 } |
956 | 957 |
957 return ProcessManager::GetSiteInstanceForURL(url); | 958 return ProcessManager::GetSiteInstanceForURL(url); |
958 } | 959 } |
959 | 960 |
960 } // namespace extensions | 961 } // namespace extensions |
OLD | NEW |