Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: extensions/browser/guest_view/app_view/app_view_guest.cc

Issue 1129063011: Extract LazyBackgroundTaskQueue from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased from master Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/browser/extension_system.h ('k') | extensions/browser/lazy_background_task_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/guest_view/app_view/app_view_guest.h" 5 #include "extensions/browser/guest_view/app_view/app_view_guest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/guest_view/browser/guest_view_manager.h" 8 #include "components/guest_view/browser/guest_view_manager.h"
9 #include "content/public/browser/render_view_host.h" 9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/common/renderer_preferences.h" 10 #include "content/public/common/renderer_preferences.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 pending_response_map.Get().insert( 202 pending_response_map.Get().insert(
203 std::make_pair(guest_instance_id(), 203 std::make_pair(guest_instance_id(),
204 make_linked_ptr(new ResponseInfo( 204 make_linked_ptr(new ResponseInfo(
205 guest_extension, 205 guest_extension,
206 weak_ptr_factory_.GetWeakPtr(), 206 weak_ptr_factory_.GetWeakPtr(),
207 callback)))); 207 callback))));
208 208
209 LazyBackgroundTaskQueue* queue = 209 LazyBackgroundTaskQueue* queue =
210 ExtensionSystem::Get(browser_context())->lazy_background_task_queue(); 210 LazyBackgroundTaskQueue::Get(browser_context());
211 if (queue->ShouldEnqueueTask(browser_context(), guest_extension)) { 211 if (queue->ShouldEnqueueTask(browser_context(), guest_extension)) {
212 queue->AddPendingTask(browser_context(), 212 queue->AddPendingTask(browser_context(),
213 guest_extension->id(), 213 guest_extension->id(),
214 base::Bind( 214 base::Bind(
215 &AppViewGuest::LaunchAppAndFireEvent, 215 &AppViewGuest::LaunchAppAndFireEvent,
216 weak_ptr_factory_.GetWeakPtr(), 216 weak_ptr_factory_.GetWeakPtr(),
217 base::Passed(make_scoped_ptr(data->DeepCopy())), 217 base::Passed(make_scoped_ptr(data->DeepCopy())),
218 callback)); 218 callback));
219 return; 219 return;
220 } 220 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 embed_request->Set(appview::kData, data.release()); 288 embed_request->Set(appview::kData, data.release());
289 AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent( 289 AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent(
290 browser_context(), embed_request.Pass(), extension_host->extension()); 290 browser_context(), embed_request.Pass(), extension_host->extension());
291 } 291 }
292 292
293 void AppViewGuest::SetAppDelegateForTest(AppDelegate* delegate) { 293 void AppViewGuest::SetAppDelegateForTest(AppDelegate* delegate) {
294 app_delegate_.reset(delegate); 294 app_delegate_.reset(delegate);
295 } 295 }
296 296
297 } // namespace extensions 297 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_system.h ('k') | extensions/browser/lazy_background_task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698