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

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

Issue 1535983002: ServiceWorker: Factor out functions to collect client information from ServiceWorkerVersion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 | « no previous file | content/browser/service_worker/service_worker_client_navigation_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_NAVIGATION_UTILS_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_NAVIGATION_UTILS_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/memory/weak_ptr.h"
12 #include "content/common/service_worker/service_worker_status_code.h"
13
14 class GURL;
15
16 namespace content {
17
18 class ServiceWorkerContextCore;
19 struct ServiceWorkerClientInfo;
20
21 namespace service_worker_client_navigation_utils {
22
23 using NavigationCallback =
24 base::Callback<void(ServiceWorkerStatusCode status,
25 const std::string& client_uuid,
26 const ServiceWorkerClientInfo& client_info)>;
27
28 // Opens a new window and navigates it to |url|. |callback| is called with the
29 // window's client information on completion.
30 void OpenWindow(const GURL& url,
31 const GURL& script_url,
32 int worker_process_id,
33 const base::WeakPtr<ServiceWorkerContextCore>& context,
34 const NavigationCallback& callback);
35
36 // Navigates the client specified by |process_id| and |frame_id| to |url|.
37 // |callback| is called with the client information on completion.
38 void NavigateClient(const GURL& url,
39 const GURL& script_url,
40 int process_id,
41 int frame_id,
42 const base::WeakPtr<ServiceWorkerContextCore>& context,
43 const NavigationCallback& callback);
44
45 } // namespace service_worker_client_navigation_utils
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CLIENT_NAVIGATION_UTILS _H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_client_navigation_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698