| OLD | NEW | 
|---|
| 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 <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 49 | 49 | 
| 50 class TestLabel : public Label { | 50 class TestLabel : public Label { | 
| 51  public: | 51  public: | 
| 52   TestLabel() : Label(ASCIIToUTF16("TestLabel")) { SizeToPreferredSize(); } | 52   TestLabel() : Label(ASCIIToUTF16("TestLabel")) { SizeToPreferredSize(); } | 
| 53 | 53 | 
| 54   int schedule_paint_count() const { return schedule_paint_count_; } | 54   int schedule_paint_count() const { return schedule_paint_count_; } | 
| 55 | 55 | 
| 56   void SimulatePaint() { | 56   void SimulatePaint() { | 
| 57     SkBitmap bitmap; | 57     SkBitmap bitmap; | 
| 58     SkColor color = SK_ColorTRANSPARENT; | 58     SkColor color = SK_ColorTRANSPARENT; | 
| 59     Paint(ui::CanvasPainter(&bitmap, bounds().size(), 1.f, color).context()); | 59     Paint(ui::PaintInfo( | 
|  | 60         ui::CanvasPainter(&bitmap, bounds().size(), 1.f, color).context(), | 
|  | 61         bounds().size())); | 
| 60   } | 62   } | 
| 61 | 63 | 
| 62   // View: | 64   // View: | 
| 63   void SchedulePaintInRect(const gfx::Rect& r) override { | 65   void SchedulePaintInRect(const gfx::Rect& r) override { | 
| 64     ++schedule_paint_count_; | 66     ++schedule_paint_count_; | 
| 65     Label::SchedulePaintInRect(r); | 67     Label::SchedulePaintInRect(r); | 
| 66   } | 68   } | 
| 67 | 69 | 
| 68  private: | 70  private: | 
| 69   int schedule_paint_count_ = 0; | 71   int schedule_paint_count_ = 0; | 
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1321   EXPECT_FALSE(IsMenuCommandEnabled(IDS_APP_SELECT_ALL)); | 1323   EXPECT_FALSE(IsMenuCommandEnabled(IDS_APP_SELECT_ALL)); | 
| 1322 } | 1324 } | 
| 1323 | 1325 | 
| 1324 INSTANTIATE_TEST_CASE_P(, | 1326 INSTANTIATE_TEST_CASE_P(, | 
| 1325                         MDLabelTest, | 1327                         MDLabelTest, | 
| 1326                         ::testing::Values(SecondaryUiMode::MD, | 1328                         ::testing::Values(SecondaryUiMode::MD, | 
| 1327                                           SecondaryUiMode::NON_MD), | 1329                                           SecondaryUiMode::NON_MD), | 
| 1328                         &SecondaryUiModeToString); | 1330                         &SecondaryUiModeToString); | 
| 1329 | 1331 | 
| 1330 }  // namespace views | 1332 }  // namespace views | 
| OLD | NEW | 
|---|