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

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

Issue 1285373002: Ensure that Service Worker clients are always returned in MRU order (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move focus handling machinery to FocusTreeNode and fix capitalization. Created 5 years, 4 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
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_COMMON_SERVICE_WORKER_SERVICE_WORKER_CLIENT_INFO_H_ 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_CLIENT_INFO_H_
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_CLIENT_INFO_H_ 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_CLIENT_INFO_H_
7 7
8 #include "base/time/time.h"
8 #include "content/public/common/request_context_frame_type.h" 9 #include "content/public/common/request_context_frame_type.h"
9 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 10 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
10 #include "third_party/WebKit/public/platform/WebServiceWorkerClientType.h" 11 #include "third_party/WebKit/public/platform/WebServiceWorkerClientType.h"
11 #include "url/gurl.h" 12 #include "url/gurl.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 // This class holds the information related to a service worker window client. 16 // This class holds the information related to a service worker window client.
16 // It is the content/ equivalent of Blink's WebServiceWorkerClientInfo. 17 // It is the content/ equivalent of Blink's WebServiceWorkerClientInfo.
17 // An instance can be created empty or can be filed with the expected 18 // An instance can be created empty or can be filed with the expected
18 // properties. Except for the client_uuid, it is preferred to use the 19 // properties. Except for the client_uuid, it is preferred to use the
19 // constructor to fill the properties. 20 // constructor to fill the properties.
20 struct ServiceWorkerClientInfo { 21 struct ServiceWorkerClientInfo {
21 ServiceWorkerClientInfo(); 22 ServiceWorkerClientInfo();
22 ServiceWorkerClientInfo(blink::WebPageVisibilityState page_visibility_state, 23 ServiceWorkerClientInfo(blink::WebPageVisibilityState page_visibility_state,
23 bool is_focused, 24 bool is_focused,
24 const GURL& url, 25 const GURL& url,
25 RequestContextFrameType frame_type, 26 RequestContextFrameType frame_type,
27 base::TimeTicks last_active_time,
nhiroki 2015/08/19 07:42:33 nit: last_focus_time
jeremyarcher 2015/08/19 07:50:57 Done.
26 blink::WebServiceWorkerClientType client_type); 28 blink::WebServiceWorkerClientType client_type);
27 29
28 // Returns whether the instance is empty. 30 // Returns whether the instance is empty.
29 bool IsEmpty() const; 31 bool IsEmpty() const;
30 32
31 // Returns whether the instance is valid. A valid instance is not empty and 33 // Returns whether the instance is valid. A valid instance is not empty and
32 // has a valid client_uuid. 34 // has a valid client_uuid.
33 bool IsValid() const; 35 bool IsValid() const;
34 36
35 std::string client_uuid; 37 std::string client_uuid;
36 blink::WebPageVisibilityState page_visibility_state; 38 blink::WebPageVisibilityState page_visibility_state;
37 bool is_focused; 39 bool is_focused;
38 GURL url; 40 GURL url;
39 RequestContextFrameType frame_type; 41 RequestContextFrameType frame_type;
40 blink::WebServiceWorkerClientType client_type; 42 blink::WebServiceWorkerClientType client_type;
43 base::TimeTicks last_active_time;
nhiroki 2015/08/19 07:42:33 ditto
jeremyarcher 2015/08/19 07:50:57 Done.
41 }; 44 };
42 45
43 } // namespace content 46 } // namespace content
44 47
45 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_CLIENT_INFO_H_ 48 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_CLIENT_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698