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

Side by Side Diff: ui/aura/root_window.cc

Issue 10026013: Update use of TimeDelta in chrome/browser/*, ui/views/*, and other places. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 static_cast<Window*>(consumer) : NULL; 83 static_cast<Window*>(consumer) : NULL;
84 } 84 }
85 85
86 } // namespace 86 } // namespace
87 87
88 CompositorLock::CompositorLock(RootWindow* root_window) 88 CompositorLock::CompositorLock(RootWindow* root_window)
89 : root_window_(root_window) { 89 : root_window_(root_window) {
90 MessageLoop::current()->PostDelayedTask( 90 MessageLoop::current()->PostDelayedTask(
91 FROM_HERE, 91 FROM_HERE,
92 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()), 92 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()),
93 kCompositorLockTimeoutMs); 93 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs));
94 } 94 }
95 95
96 CompositorLock::~CompositorLock() { 96 CompositorLock::~CompositorLock() {
97 CancelLock(); 97 CancelLock();
98 } 98 }
99 99
100 void CompositorLock::CancelLock() { 100 void CompositorLock::CancelLock() {
101 if (!root_window_) 101 if (!root_window_)
102 return; 102 return;
103 root_window_->UnlockCompositor(); 103 root_window_->UnlockCompositor();
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 void RootWindow::UnlockCompositor() { 1029 void RootWindow::UnlockCompositor() {
1030 DCHECK(compositor_lock_); 1030 DCHECK(compositor_lock_);
1031 compositor_lock_ = NULL; 1031 compositor_lock_ = NULL;
1032 if (draw_on_compositor_unlock_) { 1032 if (draw_on_compositor_unlock_) {
1033 draw_on_compositor_unlock_ = false; 1033 draw_on_compositor_unlock_ = false;
1034 ScheduleDraw(); 1034 ScheduleDraw();
1035 } 1035 }
1036 } 1036 }
1037 1037
1038 } // namespace aura 1038 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | ui/views/controls/button/button_dropdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698