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

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

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 years 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
« no previous file with comments | « ui/aura/window_tree_host_platform.h ('k') | ui/aura/window_tree_host_unittest.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/window_tree_host_platform.h" 5 #include "ui/aura/window_tree_host_platform.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 void WindowTreeHostPlatform::ShowImpl() { 85 void WindowTreeHostPlatform::ShowImpl() {
86 window_->Show(); 86 window_->Show();
87 } 87 }
88 88
89 void WindowTreeHostPlatform::HideImpl() { 89 void WindowTreeHostPlatform::HideImpl() {
90 window_->Hide(); 90 window_->Hide();
91 } 91 }
92 92
93 gfx::Rect WindowTreeHostPlatform::GetBounds() const { 93 gfx::Rect WindowTreeHostPlatform::GetBoundsInPixels() const {
94 return window_ ? window_->GetBounds() : gfx::Rect(); 94 return window_ ? window_->GetBounds() : gfx::Rect();
95 } 95 }
96 96
97 void WindowTreeHostPlatform::SetBounds(const gfx::Rect& bounds) { 97 void WindowTreeHostPlatform::SetBoundsInPixels(const gfx::Rect& bounds) {
98 window_->SetBounds(bounds); 98 window_->SetBounds(bounds);
99 } 99 }
100 100
101 gfx::Point WindowTreeHostPlatform::GetLocationOnNativeScreen() const { 101 gfx::Point WindowTreeHostPlatform::GetLocationOnNativeScreen() const {
102 return window_->GetBounds().origin(); 102 return window_->GetBounds().origin();
103 } 103 }
104 104
105 void WindowTreeHostPlatform::SetCapture() { 105 void WindowTreeHostPlatform::SetCapture() {
106 window_->SetCapture(); 106 window_->SetCapture();
107 } 107 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 DCHECK_EQ(widget, widget_); 187 DCHECK_EQ(widget, widget_);
188 widget_ = gfx::kNullAcceleratedWidget; 188 widget_ = gfx::kNullAcceleratedWidget;
189 } 189 }
190 190
191 void WindowTreeHostPlatform::OnActivationChanged(bool active) { 191 void WindowTreeHostPlatform::OnActivationChanged(bool active) {
192 if (active) 192 if (active)
193 OnHostActivated(); 193 OnHostActivated();
194 } 194 }
195 195
196 } // namespace aura 196 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_platform.h ('k') | ui/aura/window_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698