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

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

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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
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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 return reinterpret_cast<void*>(GetPropertyInternal(key, 0)); 621 return reinterpret_cast<void*>(GetPropertyInternal(key, 0));
622 } 622 }
623 623
624 void Window::OnDeviceScaleFactorChanged(float device_scale_factor) { 624 void Window::OnDeviceScaleFactorChanged(float device_scale_factor) {
625 if (delegate_) 625 if (delegate_)
626 delegate_->OnDeviceScaleFactorChanged(device_scale_factor); 626 delegate_->OnDeviceScaleFactorChanged(device_scale_factor);
627 } 627 }
628 628
629 #ifndef NDEBUG 629 #ifndef NDEBUG
630 std::string Window::GetDebugInfo() const { 630 std::string Window::GetDebugInfo() const {
631 return StringPrintf( 631 return base::StringPrintf(
632 "%s<%d> bounds(%d, %d, %d, %d) %s %s opacity=%.1f", 632 "%s<%d> bounds(%d, %d, %d, %d) %s %s opacity=%.1f",
633 name().empty() ? "Unknown" : name().c_str(), id(), 633 name().empty() ? "Unknown" : name().c_str(), id(),
634 bounds().x(), bounds().y(), bounds().width(), bounds().height(), 634 bounds().x(), bounds().y(), bounds().width(), bounds().height(),
635 visible_ ? "WindowVisible" : "WindowHidden", 635 visible_ ? "WindowVisible" : "WindowHidden",
636 layer_->GetTargetVisibility() ? "LayerVisible" : "LayerHidden", 636 layer_->GetTargetVisibility() ? "LayerVisible" : "LayerHidden",
637 layer_->opacity()); 637 layer_->opacity());
638 } 638 }
639 639
640 void Window::PrintWindowHierarchy(int depth) const { 640 void Window::PrintWindowHierarchy(int depth) const {
641 printf("%*s%s\n", depth * 2, "", GetDebugInfo().c_str()); 641 printf("%*s%s\n", depth * 2, "", GetDebugInfo().c_str());
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 bool contains_mouse = false; 1067 bool contains_mouse = false;
1068 if (IsVisible()) { 1068 if (IsVisible()) {
1069 RootWindow* root_window = GetRootWindow(); 1069 RootWindow* root_window = GetRootWindow();
1070 contains_mouse = root_window && 1070 contains_mouse = root_window &&
1071 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); 1071 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot());
1072 } 1072 }
1073 return contains_mouse; 1073 return contains_mouse;
1074 } 1074 }
1075 1075
1076 } // namespace aura 1076 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698