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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 2525113002: Rename WindowTreeHost functions to indicate pixels/dips. (Closed)
Patch Set: win 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
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/views/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 if (content_window_container_) 1166 if (content_window_container_)
1167 content_window_container_->SetBounds(new_bounds); 1167 content_window_container_->SetBounds(new_bounds);
1168 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size()); 1168 native_widget_delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
1169 } 1169 }
1170 1170
1171 void DesktopNativeWidgetAura::OnHostWorkspaceChanged( 1171 void DesktopNativeWidgetAura::OnHostWorkspaceChanged(
1172 const aura::WindowTreeHost* host) { 1172 const aura::WindowTreeHost* host) {
1173 native_widget_delegate_->OnNativeWidgetWorkspaceChanged(); 1173 native_widget_delegate_->OnNativeWidgetWorkspaceChanged();
1174 } 1174 }
1175 1175
1176 void DesktopNativeWidgetAura::OnHostMoved(const aura::WindowTreeHost* host, 1176 void DesktopNativeWidgetAura::OnHostMovedInPixels(
1177 const gfx::Point& new_origin) { 1177 const aura::WindowTreeHost* host,
1178 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMoved", 1178 const gfx::Point& new_origin_in_pixels) {
1179 "new_origin", new_origin.ToString()); 1179 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMovedInPixels",
1180 "new_origin_in_pixels", new_origin_in_pixels.ToString());
1180 1181
1181 native_widget_delegate_->OnNativeWidgetMove(); 1182 native_widget_delegate_->OnNativeWidgetMove();
1182 } 1183 }
1183 1184
1184 //////////////////////////////////////////////////////////////////////////////// 1185 ////////////////////////////////////////////////////////////////////////////////
1185 // DesktopNativeWidgetAura, private: 1186 // DesktopNativeWidgetAura, private:
1186 1187
1187 void DesktopNativeWidgetAura::UpdateWindowTransparency() { 1188 void DesktopNativeWidgetAura::UpdateWindowTransparency() {
1188 content_window_->SetTransparent( 1189 content_window_->SetTransparent(
1189 desktop_window_tree_host_->ShouldWindowContentsBeTransparent()); 1190 desktop_window_tree_host_->ShouldWindowContentsBeTransparent());
1190 // Regardless of transparency or not, this root content window will always 1191 // Regardless of transparency or not, this root content window will always
1191 // fill its bounds completely, so set this flag to true to avoid an 1192 // fill its bounds completely, so set this flag to true to avoid an
1192 // unecessary clear before update. 1193 // unecessary clear before update.
1193 content_window_->SetFillsBoundsCompletely(true); 1194 content_window_->SetFillsBoundsCompletely(true);
1194 } 1195 }
1195 1196
1196 void DesktopNativeWidgetAura::RootWindowDestroyed() { 1197 void DesktopNativeWidgetAura::RootWindowDestroyed() {
1197 cursor_reference_count_--; 1198 cursor_reference_count_--;
1198 if (cursor_reference_count_ == 0) { 1199 if (cursor_reference_count_ == 0) {
1199 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1200 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1200 // for cleaning up |cursor_manager_|. 1201 // for cleaning up |cursor_manager_|.
1201 delete cursor_manager_; 1202 delete cursor_manager_;
1202 native_cursor_manager_ = NULL; 1203 native_cursor_manager_ = NULL;
1203 cursor_manager_ = NULL; 1204 cursor_manager_ = NULL;
1204 } 1205 }
1205 } 1206 }
1206 1207
1207 } // namespace views 1208 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698