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

Unified Diff: content/browser/aura/compositor_resize_lock.cc

Issue 137893007: Add the UI compositor to the Mac build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missed file Created 6 years, 11 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/aura/compositor_resize_lock.cc
diff --git a/content/browser/aura/compositor_resize_lock.cc b/content/browser/aura/compositor_resize_lock.cc
deleted file mode 100644
index a0f17aa9bea1b51f116f5b5d9199c813cc4611de..0000000000000000000000000000000000000000
--- a/content/browser/aura/compositor_resize_lock.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2013 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.
-
-#include "content/browser/aura/compositor_resize_lock.h"
-
-#include "base/debug/trace_event.h"
-#include "content/public/browser/browser_thread.h"
-#include "ui/aura/root_window.h"
-#include "ui/compositor/compositor.h"
-
-namespace content {
-
-CompositorResizeLock::CompositorResizeLock(aura::RootWindow* root_window,
- const gfx::Size new_size,
- bool defer_compositor_lock,
- const base::TimeDelta& timeout)
- : ResizeLock(new_size, defer_compositor_lock),
- root_window_(root_window),
- weak_ptr_factory_(this),
- cancelled_(false) {
- DCHECK(root_window_);
-
- TRACE_EVENT_ASYNC_BEGIN2("ui", "CompositorResizeLock", this,
- "width", expected_size().width(),
- "height", expected_size().height());
- root_window_->HoldPointerMoves();
-
- BrowserThread::PostDelayedTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&CompositorResizeLock::CancelLock,
- weak_ptr_factory_.GetWeakPtr()),
- timeout);
-}
-
-CompositorResizeLock::~CompositorResizeLock() {
- CancelLock();
- TRACE_EVENT_ASYNC_END2("ui", "CompositorResizeLock", this,
- "width", expected_size().width(),
- "height", expected_size().height());
-}
-
-bool CompositorResizeLock::GrabDeferredLock() {
- return ResizeLock::GrabDeferredLock();
-}
-
-void CompositorResizeLock::UnlockCompositor() {
- ResizeLock::UnlockCompositor();
- compositor_lock_ = NULL;
-}
-
-void CompositorResizeLock::LockCompositor() {
- ResizeLock::LockCompositor();
- compositor_lock_ = root_window_->host()->compositor()->GetCompositorLock();
-}
-
-void CompositorResizeLock::CancelLock() {
- if (cancelled_)
- return;
- cancelled_ = true;
- UnlockCompositor();
- root_window_->ReleasePointerMoves();
-}
-
-} // namespace content
« no previous file with comments | « content/browser/aura/compositor_resize_lock.h ('k') | content/browser/aura/gpu_browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698