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

Unified Diff: content/browser/renderer_host/compositor_resize_lock_aura.cc

Issue 2773433003: Fix CompositorResizeLock to do something. (Closed)
Patch Set: resizelock: observer-rebase Created 3 years, 9 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/renderer_host/compositor_resize_lock_aura.cc
diff --git a/content/browser/renderer_host/compositor_resize_lock_aura.cc b/content/browser/renderer_host/compositor_resize_lock_aura.cc
deleted file mode 100644
index 2d36b2f859fc8294fb018c9dbe88afbfaae6a740..0000000000000000000000000000000000000000
--- a/content/browser/renderer_host/compositor_resize_lock_aura.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 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/renderer_host/compositor_resize_lock_aura.h"
-
-#include "base/trace_event/trace_event.h"
-#include "content/public/browser/browser_thread.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/aura/window_tree_host.h"
-#include "ui/compositor/compositor.h"
-
-namespace content {
-
-CompositorResizeLock::CompositorResizeLock(
- aura::WindowTreeHost* host,
- const gfx::Size new_size,
- bool defer_compositor_lock,
- const base::TimeDelta& timeout)
- : ResizeLock(new_size, defer_compositor_lock),
- host_(host),
- cancelled_(false),
- weak_ptr_factory_(this) {
- DCHECK(host_);
-
- TRACE_EVENT_ASYNC_BEGIN2("ui", "CompositorResizeLock", this,
- "width", expected_size().width(),
- "height", expected_size().height());
- host_->dispatcher()->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_ = host_->compositor()->GetCompositorLock();
-}
-
-void CompositorResizeLock::CancelLock() {
- if (cancelled_)
- return;
- cancelled_ = true;
- UnlockCompositor();
- host_->dispatcher()->ReleasePointerMoves();
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698