OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/toolbar/app_menu_button.h" | 5 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "chrome/browser/themes/theme_properties.h" | 12 #include "chrome/browser/themes/theme_properties.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/layout_constants.h" | 14 #include "chrome/browser/ui/layout_constants.h" |
15 #include "chrome/browser/ui/toolbar/app_menu_model.h" | 15 #include "chrome/browser/ui/toolbar/app_menu_model.h" |
16 #include "chrome/browser/ui/views/extensions/browser_action_drag_data.h" | 16 #include "chrome/browser/ui/views/extensions/browser_action_drag_data.h" |
17 #include "chrome/browser/ui/views/toolbar/app_menu.h" | 17 #include "chrome/browser/ui/views/toolbar/app_menu.h" |
18 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 18 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
19 #include "extensions/common/feature_switch.h" | 19 #include "extensions/common/feature_switch.h" |
20 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 views::MenuButton::OnPaint(canvas); | 244 views::MenuButton::OnPaint(canvas); |
245 if (ui::MaterialDesignController::IsModeMaterial()) | 245 if (ui::MaterialDesignController::IsModeMaterial()) |
246 return; | 246 return; |
247 // Use GetPreferredSize() to center the icon inside the visible bounds rather | 247 // Use GetPreferredSize() to center the icon inside the visible bounds rather |
248 // than the whole size() (which may refer to hit test region extended to the | 248 // than the whole size() (which may refer to hit test region extended to the |
249 // end of the toolbar in maximized mode). | 249 // end of the toolbar in maximized mode). |
250 icon_painter_->Paint(canvas, GetThemeProvider(), | 250 icon_painter_->Paint(canvas, GetThemeProvider(), |
251 gfx::Rect(GetPreferredSize()), | 251 gfx::Rect(GetPreferredSize()), |
252 AppMenuIconPainter::BEZEL_NONE); | 252 AppMenuIconPainter::BEZEL_NONE); |
253 } | 253 } |
OLD | NEW |