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

Unified Diff: content/browser/gpu/gpu_surface_tracker.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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/browser/gpu/gpu_surface_tracker.cc
diff --git a/content/browser/gpu/gpu_surface_tracker.cc b/content/browser/gpu/gpu_surface_tracker.cc
index 350e6f3831c3f4077229eff8355b7c915133b03e..42ce146dd4d118eb9cd8777c23848e0570a874ae 100644
--- a/content/browser/gpu/gpu_surface_tracker.cc
+++ b/content/browser/gpu/gpu_surface_tracker.cc
@@ -10,57 +10,8 @@
#include "base/logging.h"
-#if defined(TOOLKIT_GTK)
-#include "base/bind.h"
-#include "content/public/browser/browser_thread.h"
-#include "ui/gfx/gtk_native_view_id_manager.h"
-#endif // defined(TOOLKIT_GTK)
-
namespace content {
-namespace {
-#if defined(TOOLKIT_GTK)
-
-void ReleasePermanentXIDDispatcher(
- const gfx::PluginWindowHandle& surface) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- GtkNativeViewManager* manager = GtkNativeViewManager::GetInstance();
- manager->ReleasePermanentXID(surface);
-}
-
-// Implementation of SurfaceRef that allows GTK to ref and unref the
-// surface with the GtkNativeViewManager.
-class SurfaceRefPluginWindow : public GpuSurfaceTracker::SurfaceRef {
- public:
- SurfaceRefPluginWindow(const gfx::PluginWindowHandle& surface_ref);
- private:
- virtual ~SurfaceRefPluginWindow();
- gfx::PluginWindowHandle surface_;
-};
-
-SurfaceRefPluginWindow::SurfaceRefPluginWindow(
- const gfx::PluginWindowHandle& surface)
- : surface_(surface) {
- if (surface_ != gfx::kNullPluginWindow) {
- GtkNativeViewManager* manager = GtkNativeViewManager::GetInstance();
- if (!manager->AddRefPermanentXID(surface_)) {
- LOG(ERROR) << "Surface " << surface << " cannot be referenced.";
- }
- }
-}
-
-SurfaceRefPluginWindow::~SurfaceRefPluginWindow() {
- if (surface_ != gfx::kNullPluginWindow) {
- BrowserThread::PostTask(BrowserThread::UI,
- FROM_HERE,
- base::Bind(&ReleasePermanentXIDDispatcher,
- surface_));
- }
-}
-#endif // defined(TOOLKIT_GTK)
-} // anonymous
-
GpuSurfaceTracker::GpuSurfaceTracker()
: next_surface_id_(1) {
GpuSurfaceLookup::InitInstance(this);
@@ -134,9 +85,6 @@ void GpuSurfaceTracker::SetSurfaceHandle(int surface_id,
DCHECK(surface_map_.find(surface_id) != surface_map_.end());
SurfaceInfo& info = surface_map_[surface_id];
info.handle = handle;
-#if defined(TOOLKIT_GTK)
- info.surface_ref = new SurfaceRefPluginWindow(handle.handle);
-#endif // defined(TOOLKIT_GTK)
}
gfx::GLSurfaceHandle GpuSurfaceTracker::GetSurfaceHandle(int surface_id) {

Powered by Google App Engine
This is Rietveld 408576698