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

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

Issue 389663003: aura: Remove WindowTreeHost::OnDeviceScaleFactorChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/remote_window_tree_host_win.cc ('k') | ui/aura/window_tree_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/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 SetPropertyInternal( 788 SetPropertyInternal(
789 key, key, NULL, reinterpret_cast<int64>(value), 0); 789 key, key, NULL, reinterpret_cast<int64>(value), 0);
790 } 790 }
791 791
792 void* Window::GetNativeWindowProperty(const char* key) const { 792 void* Window::GetNativeWindowProperty(const char* key) const {
793 return reinterpret_cast<void*>(GetPropertyInternal(key, 0)); 793 return reinterpret_cast<void*>(GetPropertyInternal(key, 0));
794 } 794 }
795 795
796 void Window::OnDeviceScaleFactorChanged(float device_scale_factor) { 796 void Window::OnDeviceScaleFactorChanged(float device_scale_factor) {
797 ScopedCursorHider hider(this); 797 ScopedCursorHider hider(this);
798 if (IsRootWindow())
799 host_->OnDeviceScaleFactorChanged(device_scale_factor);
800 if (delegate_) 798 if (delegate_)
801 delegate_->OnDeviceScaleFactorChanged(device_scale_factor); 799 delegate_->OnDeviceScaleFactorChanged(device_scale_factor);
802 } 800 }
803 801
804 #if !defined(NDEBUG) 802 #if !defined(NDEBUG)
805 std::string Window::GetDebugInfo() const { 803 std::string Window::GetDebugInfo() const {
806 return base::StringPrintf( 804 return base::StringPrintf(
807 "%s<%d> bounds(%d, %d, %d, %d) %s %s opacity=%.1f", 805 "%s<%d> bounds(%d, %d, %d, %d) %s %s opacity=%.1f",
808 name().empty() ? "Unknown" : name().c_str(), id(), 806 name().empty() ? "Unknown" : name().c_str(), id(),
809 bounds().x(), bounds().y(), bounds().width(), bounds().height(), 807 bounds().x(), bounds().y(), bounds().width(), bounds().height(),
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 return window; 1443 return window;
1446 if (offset) 1444 if (offset)
1447 *offset += window->bounds().OffsetFromOrigin(); 1445 *offset += window->bounds().OffsetFromOrigin();
1448 } 1446 }
1449 if (offset) 1447 if (offset)
1450 *offset = gfx::Vector2d(); 1448 *offset = gfx::Vector2d();
1451 return NULL; 1449 return NULL;
1452 } 1450 }
1453 1451
1454 } // namespace aura 1452 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/remote_window_tree_host_win.cc ('k') | ui/aura/window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698