OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/views/location_bar/add_to_app_launcher_view.h" | 5 #include "chrome/browser/ui/views/location_bar/add_to_app_launcher_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/grit/generated_resources.h" |
11 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
12 #include "grit/generated_resources.h" | |
13 #include "grit/theme_resources.h" | 13 #include "grit/theme_resources.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/gfx/color_utils.h" | 16 #include "ui/gfx/color_utils.h" |
17 #include "ui/views/controls/image_view.h" | 17 #include "ui/views/controls/image_view.h" |
18 #include "ui/views/controls/label.h" | 18 #include "ui/views/controls/label.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 icon_->bounds().right() + LocationBarView::kItemPadding, | 168 icon_->bounds().right() + LocationBarView::kItemPadding, |
169 0, | 169 0, |
170 std::max(width() - GetTotalSpacingWhileAnimating() - icon_width, 0), | 170 std::max(width() - GetTotalSpacingWhileAnimating() - icon_width, 0), |
171 height()); | 171 height()); |
172 } | 172 } |
173 | 173 |
174 void AddToAppLauncherView::OnPaintBackground(gfx::Canvas* canvas) { | 174 void AddToAppLauncherView::OnPaintBackground(gfx::Canvas* canvas) { |
175 if (slide_animator_.is_animating()) | 175 if (slide_animator_.is_animating()) |
176 background_painter_->Paint(canvas, size()); | 176 background_painter_->Paint(canvas, size()); |
177 } | 177 } |
OLD | NEW |