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

Side by Side Diff: services/resource_coordinator/coordination_unit/coordination_unit_impl.h

Issue 2925963002: Create NetworkQuietDetector. (Closed)
Patch Set: Dont create NetworkQuietDetector when FrameResourceCoordinator is not enabled 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H _ 5 #ifndef SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H _
6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H _ 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H _
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void RecalcCoordinationPolicy(); 75 void RecalcCoordinationPolicy();
76 void UnregisterCoordinationPolicyCallback(); 76 void UnregisterCoordinationPolicyCallback();
77 77
78 std::unordered_map<mojom::PropertyType, base::Value> property_store_; 78 std::unordered_map<mojom::PropertyType, base::Value> property_store_;
79 79
80 enum StateFlags : uint8_t { 80 enum StateFlags : uint8_t {
81 kTestState, 81 kTestState,
82 kTabVisible, 82 kTabVisible,
83 kAudioPlaying, 83 kAudioPlaying,
84 kNetworkIdle,
84 kNumStateFlags 85 kNumStateFlags
85 }; 86 };
86 bool SelfOrParentHasFlagSet(StateFlags state); 87 bool SelfOrParentHasFlagSet(StateFlags state);
87 88
88 std::unique_ptr<service_manager::ServiceContextRef> service_ref_; 89 std::unique_ptr<service_manager::ServiceContextRef> service_ref_;
89 mojo::BindingSet<mojom::CoordinationUnit> bindings_; 90 mojo::BindingSet<mojom::CoordinationUnit> bindings_;
90 91
91 mojom::CoordinationPolicyCallbackPtr policy_callback_; 92 mojom::CoordinationPolicyCallbackPtr policy_callback_;
92 mojom::CoordinationPolicyPtr current_policy_; 93 mojom::CoordinationPolicyPtr current_policy_;
93 94
94 base::Optional<bool> state_flags_[kNumStateFlags]; 95 base::Optional<bool> state_flags_[kNumStateFlags];
95 96
96 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitImpl); 97 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitImpl);
97 }; 98 };
98 99
99 } // namespace resource_coordinator 100 } // namespace resource_coordinator
100 101
101 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMP L_H_ 102 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMP L_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698