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

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

Issue 23483041: [Cleanup] Remove mac code from aura/ash/views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/root_window_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698