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

Side by Side Diff: content/browser/service_worker/service_worker_client_utils.h

Issue 2905593002: Clients.matchAll() should return ordered clients by type/focus time/creation time (Closed)
Patch Set: Address shimazu's comments #31 and fix the test failure Created 3 years, 6 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 | « no previous file | content/browser/service_worker/service_worker_client_utils.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_UTILS_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_UTILS_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_UTILS_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 struct ServiceWorkerClientQueryOptions; 23 struct ServiceWorkerClientQueryOptions;
24 24
25 namespace service_worker_client_utils { 25 namespace service_worker_client_utils {
26 26
27 using NavigationCallback = 27 using NavigationCallback =
28 base::Callback<void(ServiceWorkerStatusCode status, 28 base::Callback<void(ServiceWorkerStatusCode status,
29 const ServiceWorkerClientInfo& client_info)>; 29 const ServiceWorkerClientInfo& client_info)>;
30 using ClientCallback = 30 using ClientCallback =
31 base::Callback<void(const ServiceWorkerClientInfo& client_info)>; 31 base::Callback<void(const ServiceWorkerClientInfo& client_info)>;
32 using ServiceWorkerClients = std::vector<ServiceWorkerClientInfo>; 32 using ServiceWorkerClients = std::vector<ServiceWorkerClientInfo>;
33 using ClientsCallback = base::Callback<void(ServiceWorkerClients* clients)>; 33 using ClientsCallback =
34 base::Callback<void(std::unique_ptr<ServiceWorkerClients> clients)>;
34 35
35 // Focuses the window client associated with |provider_host|. |callback| is 36 // Focuses the window client associated with |provider_host|. |callback| is
36 // called with the client information on completion. 37 // called with the client information on completion.
37 void FocusWindowClient(ServiceWorkerProviderHost* provider_host, 38 void FocusWindowClient(ServiceWorkerProviderHost* provider_host,
38 const ClientCallback& callback); 39 const ClientCallback& callback);
39 40
40 // Opens a new window and navigates it to |url|. |callback| is called with the 41 // Opens a new window and navigates it to |url|. |callback| is called with the
41 // window's client information on completion. 42 // window's client information on completion.
42 void OpenWindow(const GURL& url, 43 void OpenWindow(const GURL& url,
43 const GURL& script_url, 44 const GURL& script_url,
(...skipping 19 matching lines...) Expand all
63 // information sorted in MRU order (most recently focused order) on completion. 64 // information sorted in MRU order (most recently focused order) on completion.
64 void GetClients(const base::WeakPtr<ServiceWorkerVersion>& controller, 65 void GetClients(const base::WeakPtr<ServiceWorkerVersion>& controller,
65 const ServiceWorkerClientQueryOptions& options, 66 const ServiceWorkerClientQueryOptions& options,
66 const ClientsCallback& callback); 67 const ClientsCallback& callback);
67 68
68 } // namespace service_worker_client_utils 69 } // namespace service_worker_client_utils
69 70
70 } // namespace content 71 } // namespace content
71 72
72 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_UTILS_H_ 73 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_client_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698