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

Unified Diff: components/memory_coordinator/child/child_memory_coordinator_impl.h

Issue 2321313002: Move components/memory_coordinator -> content/ (Closed)
Patch Set: rebase etc Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/memory_coordinator/child/child_memory_coordinator_impl.h
diff --git a/components/memory_coordinator/child/child_memory_coordinator_impl.h b/components/memory_coordinator/child/child_memory_coordinator_impl.h
deleted file mode 100644
index c63a7639624ed60b050c1645c02f250e3850cc57..0000000000000000000000000000000000000000
--- a/components/memory_coordinator/child/child_memory_coordinator_impl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_H_
-#define COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_H_
-
-#include "base/compiler_specific.h"
-#include "base/memory/memory_coordinator_client.h"
-#include "components/memory_coordinator/common/memory_coordinator_export.h"
-#include "components/memory_coordinator/common/memory_coordinator_features.h"
-#include "components/memory_coordinator/public/interfaces/child_memory_coordinator.mojom.h"
-#include "components/memory_coordinator/public/interfaces/memory_coordinator.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
-
-namespace memory_coordinator {
-
-class MEMORY_COORDINATOR_EXPORT ChildMemoryCoordinatorDelegate {
- public:
- virtual ~ChildMemoryCoordinatorDelegate() {}
-
- // Called when the system requests immediate actions to free memory.
- virtual void OnTrimMemoryImmediately() = 0;
-};
-
-// ChildMemoryCoordinatorImpl is the implementation of ChildMemoryCoordinator.
-// It lives in child processes and is responsible for dispatching memory events
-// to its clients.
-class MEMORY_COORDINATOR_EXPORT ChildMemoryCoordinatorImpl
- : NON_EXPORTED_BASE(public mojom::ChildMemoryCoordinator) {
- public:
- // Returns the instance of ChildMemoryCoordinatorImpl. Could be nullptr.
- static ChildMemoryCoordinatorImpl* GetInstance();
-
- ChildMemoryCoordinatorImpl(mojom::MemoryCoordinatorHandlePtr parent,
- ChildMemoryCoordinatorDelegate* delegate);
- ~ChildMemoryCoordinatorImpl() override;
-
- // mojom::ChildMemoryCoordinator implementations:
- void OnStateChange(mojom::MemoryState state) override;
-
- protected:
- ChildMemoryCoordinatorDelegate* delegate() { return delegate_; }
-
- private:
- friend class ChildMemoryCoordinatorImplTest;
-
- mojo::Binding<mojom::ChildMemoryCoordinator> binding_;
- mojom::MemoryCoordinatorHandlePtr parent_;
- ChildMemoryCoordinatorDelegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildMemoryCoordinatorImpl);
-};
-
-// Factory function for creating a ChildMemoryCoordinator for the current
-// platform. Doesn't take the ownership of |delegate|.
-MEMORY_COORDINATOR_EXPORT std::unique_ptr<ChildMemoryCoordinatorImpl>
-CreateChildMemoryCoordinator(mojom::MemoryCoordinatorHandlePtr parent,
- ChildMemoryCoordinatorDelegate* delegate);
-
-} // namespace memory_coordinator
-
-#endif // COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698