| OLD | NEW |
| 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/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static_cast<Window*>(consumer) : NULL; | 76 static_cast<Window*>(consumer) : NULL; |
| 77 } | 77 } |
| 78 | 78 |
| 79 void SetLastMouseLocation(const Window* root_window, | 79 void SetLastMouseLocation(const Window* root_window, |
| 80 const gfx::Point& location) { | 80 const gfx::Point& location) { |
| 81 Env::GetInstance()->SetLastMouseLocation(*root_window, location); | 81 Env::GetInstance()->SetLastMouseLocation(*root_window, location); |
| 82 } | 82 } |
| 83 | 83 |
| 84 RootWindowHost* CreateHost(RootWindow* root_window, | 84 RootWindowHost* CreateHost(RootWindow* root_window, |
| 85 const RootWindow::CreateParams& params) { | 85 const RootWindow::CreateParams& params) { |
| 86 return params.host ? params.host : | 86 RootWindowHost* host = params.host ? |
| 87 RootWindowHost::Create(root_window, params.initial_bounds); | 87 params.host : RootWindowHost::Create(params.initial_bounds); |
| 88 host->SetDelegate(root_window); |
| 89 return host; |
| 88 } | 90 } |
| 89 | 91 |
| 90 } // namespace | 92 } // namespace |
| 91 | 93 |
| 92 CompositorLock::CompositorLock(RootWindow* root_window) | 94 CompositorLock::CompositorLock(RootWindow* root_window) |
| 93 : root_window_(root_window) { | 95 : root_window_(root_window) { |
| 94 MessageLoop::current()->PostDelayedTask( | 96 MessageLoop::current()->PostDelayedTask( |
| 95 FROM_HERE, | 97 FROM_HERE, |
| 96 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()), | 98 base::Bind(&CompositorLock::CancelLock, AsWeakPtr()), |
| 97 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)); | 99 base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs)); |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 void RootWindow::UnlockCompositor() { | 1060 void RootWindow::UnlockCompositor() { |
| 1059 DCHECK(compositor_lock_); | 1061 DCHECK(compositor_lock_); |
| 1060 compositor_lock_ = NULL; | 1062 compositor_lock_ = NULL; |
| 1061 if (draw_on_compositor_unlock_) { | 1063 if (draw_on_compositor_unlock_) { |
| 1062 draw_on_compositor_unlock_ = false; | 1064 draw_on_compositor_unlock_ = false; |
| 1063 ScheduleDraw(); | 1065 ScheduleDraw(); |
| 1064 } | 1066 } |
| 1065 } | 1067 } |
| 1066 | 1068 |
| 1067 } // namespace aura | 1069 } // namespace aura |
| OLD | NEW |