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

Side by Side Diff: content/common/service_worker/service_worker_client_info.h

Issue 893783002: Revert of Gather the ServiceWorker client information in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rfh_getvisibilitystate
Patch Set: Created 5 years, 10 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
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_COMMON_SERVICE_WORKER_SERVICE_WORKER_INFO_CLIENT_H_
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_INFO_CLIENT_H_
7
8 #include "content/public/common/request_context_frame_type.h"
9 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
10 #include "url/gurl.h"
11
12 namespace content {
13
14 // This class holds the information related to a service worker window client.
15 // It is the content/ equivalent of Blink's WebServiceWorkerClientInfo.
16 // An instance can be created empty or can be filed with the expected
17 // properties. Except for the client_id, it is preferred to use the constructor
18 // to fill the properties.
19 struct ServiceWorkerClientInfo {
20 ServiceWorkerClientInfo();
21 ServiceWorkerClientInfo(blink::WebPageVisibilityState page_visibility_state,
22 bool is_focused,
23 const GURL& url,
24 RequestContextFrameType frame_type);
25
26 // Returns whether the instance is empty.
27 bool IsEmpty() const;
28
29 // Returns whether the instance is valid. A valid instance is not empty and
30 // has a valid client_id.
31 bool IsValid() const;
32
33 int client_id;
34 blink::WebPageVisibilityState page_visibility_state;
35 bool is_focused;
36 GURL url;
37 RequestContextFrameType frame_type;
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_INFO_CLIENT_H_
OLDNEW
« no previous file with comments | « content/child/service_worker/service_worker_dispatcher.cc ('k') | content/common/service_worker/service_worker_client_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698