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

Side by Side Diff: content/renderer/service_worker/service_worker_script_context.cc

Issue 806703004: [ServiceWorker] Use WebPageVisibilityState in ClientInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « content/renderer/render_view_impl.h ('k') | content/test/test_render_frame_host.cc » ('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 "content/renderer/service_worker/service_worker_script_context.h" 5 #include "content/renderer/service_worker/service_worker_script_context.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "content/child/notifications/notification_data_conversions.h" 10 #include "content/child/notifications/notification_data_conversions.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 if (!callbacks) { 407 if (!callbacks) {
408 NOTREACHED() << "Got stray response: " << request_id; 408 NOTREACHED() << "Got stray response: " << request_id;
409 return; 409 return;
410 } 410 }
411 scoped_ptr<blink::WebServiceWorkerClientsInfo> info( 411 scoped_ptr<blink::WebServiceWorkerClientsInfo> info(
412 new blink::WebServiceWorkerClientsInfo); 412 new blink::WebServiceWorkerClientsInfo);
413 blink::WebVector<blink::WebServiceWorkerClientInfo> convertedClients( 413 blink::WebVector<blink::WebServiceWorkerClientInfo> convertedClients(
414 clients.size()); 414 clients.size());
415 for (size_t i = 0; i < clients.size(); ++i) { 415 for (size_t i = 0; i < clients.size(); ++i) {
416 convertedClients[i].clientID = clients[i].client_id; 416 convertedClients[i].clientID = clients[i].client_id;
417 convertedClients[i].visibilityState = 417 convertedClients[i].pageVisibilityState = clients[i].page_visibility_state;
418 blink::WebString::fromUTF8(clients[i].visibility_state);
419 convertedClients[i].isFocused = clients[i].is_focused; 418 convertedClients[i].isFocused = clients[i].is_focused;
420 convertedClients[i].url = clients[i].url; 419 convertedClients[i].url = clients[i].url;
421 convertedClients[i].frameType = 420 convertedClients[i].frameType =
422 static_cast<blink::WebURLRequest::FrameType>(clients[i].frame_type); 421 static_cast<blink::WebURLRequest::FrameType>(clients[i].frame_type);
423 } 422 }
424 info->clients.swap(convertedClients); 423 info->clients.swap(convertedClients);
425 callbacks->onSuccess(info.release()); 424 callbacks->onSuccess(info.release());
426 pending_clients_callbacks_.Remove(request_id); 425 pending_clients_callbacks_.Remove(request_id);
427 } 426 }
428 427
(...skipping 18 matching lines...) Expand all
447 pending_skip_waiting_callbacks_.Lookup(request_id); 446 pending_skip_waiting_callbacks_.Lookup(request_id);
448 if (!callbacks) { 447 if (!callbacks) {
449 NOTREACHED() << "Got stray response: " << request_id; 448 NOTREACHED() << "Got stray response: " << request_id;
450 return; 449 return;
451 } 450 }
452 callbacks->onSuccess(); 451 callbacks->onSuccess();
453 pending_skip_waiting_callbacks_.Remove(request_id); 452 pending_skip_waiting_callbacks_.Remove(request_id);
454 } 453 }
455 454
456 } // namespace content 455 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698