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

Side by Side Diff: ui/views/controls/label.cc

Issue 823703003: Cleanup: Update the path to insets and point headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: point.h Created 6 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/views/controls/image_view.cc ('k') | ui/views/controls/menu/menu_controller.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 (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/controls/label.h" 5 #include "ui/views/controls/label.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/profiler/scoped_tracker.h" 14 #include "base/profiler/scoped_tracker.h"
15 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "ui/accessibility/ax_view_state.h" 18 #include "ui/accessibility/ax_view_state.h"
19 #include "ui/gfx/canvas.h" 19 #include "ui/gfx/canvas.h"
20 #include "ui/gfx/color_utils.h" 20 #include "ui/gfx/color_utils.h"
21 #include "ui/gfx/insets.h" 21 #include "ui/gfx/geometry/insets.h"
22 #include "ui/gfx/text_elider.h" 22 #include "ui/gfx/text_elider.h"
23 #include "ui/gfx/text_utils.h" 23 #include "ui/gfx/text_utils.h"
24 #include "ui/gfx/utf16_indexing.h" 24 #include "ui/gfx/utf16_indexing.h"
25 #include "ui/native_theme/native_theme.h" 25 #include "ui/native_theme/native_theme.h"
26 #include "ui/views/background.h" 26 #include "ui/views/background.h"
27 27
28 namespace { 28 namespace {
29 29
30 const int kCachedSizeLimit = 10; 30 const int kCachedSizeLimit = 10;
31 const base::char16 kPasswordReplacementChar = '*'; 31 const base::char16 kPasswordReplacementChar = '*';
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 586 }
587 587
588 bool Label::ShouldShowDefaultTooltip() const { 588 bool Label::ShouldShowDefaultTooltip() const {
589 const gfx::Size text_size = GetTextSize(); 589 const gfx::Size text_size = GetTextSize();
590 const gfx::Size size = GetContentsBounds().size(); 590 const gfx::Size size = GetContentsBounds().size();
591 return !obscured() && (text_size.width() > size.width() || 591 return !obscured() && (text_size.width() > size.width() ||
592 (multi_line_ && text_size.height() > size.height())); 592 (multi_line_ && text_size.height() > size.height()));
593 } 593 }
594 594
595 } // namespace views 595 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/image_view.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698