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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) { | 420 void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) { |
421 observers_.AddObserver(observer); | 421 observers_.AddObserver(observer); |
422 } | 422 } |
423 | 423 |
424 void RootWindow::RemoveRootWindowObserver(RootWindowObserver* observer) { | 424 void RootWindow::RemoveRootWindowObserver(RootWindowObserver* observer) { |
425 observers_.RemoveObserver(observer); | 425 observers_.RemoveObserver(observer); |
426 } | 426 } |
427 | 427 |
428 void RootWindow::PostNativeEvent(const base::NativeEvent& native_event) { | 428 void RootWindow::PostNativeEvent(const base::NativeEvent& native_event) { |
429 #if !defined(OS_MACOSX) | |
430 host_->PostNativeEvent(native_event); | 429 host_->PostNativeEvent(native_event); |
431 #endif | |
432 } | 430 } |
433 | 431 |
434 void RootWindow::ConvertPointToNativeScreen(gfx::Point* point) const { | 432 void RootWindow::ConvertPointToNativeScreen(gfx::Point* point) const { |
435 ConvertPointToHost(point); | 433 ConvertPointToHost(point); |
436 gfx::Point location = host_->GetLocationOnNativeScreen(); | 434 gfx::Point location = host_->GetLocationOnNativeScreen(); |
437 point->Offset(location.x(), location.y()); | 435 point->Offset(location.x(), location.y()); |
438 } | 436 } |
439 | 437 |
440 void RootWindow::ConvertPointFromNativeScreen(gfx::Point* point) const { | 438 void RootWindow::ConvertPointFromNativeScreen(gfx::Point* point) const { |
441 gfx::Point location = host_->GetLocationOnNativeScreen(); | 439 gfx::Point location = host_->GetLocationOnNativeScreen(); |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 } | 1239 } |
1242 | 1240 |
1243 gfx::Transform RootWindow::GetInverseRootTransform() const { | 1241 gfx::Transform RootWindow::GetInverseRootTransform() const { |
1244 float scale = ui::GetDeviceScaleFactor(layer()); | 1242 float scale = ui::GetDeviceScaleFactor(layer()); |
1245 gfx::Transform transform; | 1243 gfx::Transform transform; |
1246 transform.Scale(1.0f / scale, 1.0f / scale); | 1244 transform.Scale(1.0f / scale, 1.0f / scale); |
1247 return transformer_->GetInverseTransform() * transform; | 1245 return transformer_->GetInverseTransform() * transform; |
1248 } | 1246 } |
1249 | 1247 |
1250 } // namespace aura | 1248 } // namespace aura |
OLD | NEW |