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

Unified Diff: content/child/child_io_surface_manager_mac.h

Issue 1532813002: Replace IOSurfaceManager by directly passing IOSurface Mach ports over Chrome IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 12 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: content/child/child_io_surface_manager_mac.h
diff --git a/content/child/child_io_surface_manager_mac.h b/content/child/child_io_surface_manager_mac.h
deleted file mode 100644
index 6c849fb2541602d882f64b982c226f048e7d9e91..0000000000000000000000000000000000000000
--- a/content/child/child_io_surface_manager_mac.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 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 CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
-#define CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
-
-#include "base/mac/scoped_mach_port.h"
-#include "base/macros.h"
-#include "base/memory/singleton.h"
-#include "content/common/content_export.h"
-#include "content/common/mac/io_surface_manager_token.h"
-#include "ui/gfx/mac/io_surface_manager.h"
-
-namespace content {
-
-// Implementation of IOSurfaceManager that registers and acquires IOSurfaces
-// through a Mach service.
-class CONTENT_EXPORT ChildIOSurfaceManager : public gfx::IOSurfaceManager {
- public:
- // Returns the global ChildIOSurfaceManager.
- static ChildIOSurfaceManager* GetInstance();
-
- // Overridden from IOSurfaceManager:
- bool RegisterIOSurface(gfx::IOSurfaceId io_surface_id,
- int client_id,
- IOSurfaceRef io_surface) override;
- void UnregisterIOSurface(gfx::IOSurfaceId io_surface_id,
- int client_id) override;
- IOSurfaceRef AcquireIOSurface(gfx::IOSurfaceId io_surface_id) override;
-
- // Set the service Mach port. Ownership of |service_port| is passed to the
- // manager.
- // Note: This can be called on any thread but must happen before the
- // thread-safe IOSurfaceManager interface is used. It is the responsibility
- // of users of this class to ensure there are no races.
- void set_service_port(mach_port_t service_port) {
- service_port_.reset(service_port);
- }
-
- // Set the token used when communicating with the Mach service.
- // Note: This can be called on any thread but must happen before the
- // thread-safe IOSurfaceManager interface is used. It is the responsibility
- // of users of this class to ensure there are no races.
- void set_token(const IOSurfaceManagerToken& token) {
- token_ = token;
- }
-
- private:
- friend struct base::DefaultSingletonTraits<ChildIOSurfaceManager>;
-
- ChildIOSurfaceManager();
- ~ChildIOSurfaceManager() override;
-
- base::mac::ScopedMachSendRight service_port_;
- IOSurfaceManagerToken token_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildIOSurfaceManager);
-};
-
-} // namespace content
-
-#endif // CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/child/child_io_surface_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698