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/toolbar/extension_toolbar_menu_view.h" | 5 #include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.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/ui/toolbar/toolbar_actions_bar.h" | 12 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
13 #include "chrome/browser/ui/views/frame/browser_view.h" | 13 #include "chrome/browser/ui/views/frame/browser_view.h" |
14 #include "chrome/browser/ui/views/toolbar/app_menu.h" | 14 #include "chrome/browser/ui/views/toolbar/app_menu.h" |
15 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" | 15 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
16 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 16 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
17 #include "ui/views/controls/menu/menu_item_view.h" | 17 #include "ui/views/controls/menu/menu_item_view.h" |
18 #include "ui/views/controls/menu/submenu_view.h" | 18 #include "ui/views/controls/menu/submenu_view.h" |
19 | 19 |
20 namespace { | 20 namespace { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 int ExtensionToolbarMenuView::start_padding() const { | 130 int ExtensionToolbarMenuView::start_padding() const { |
131 // We pad enough on the left so that the first icon starts at the same point | 131 // We pad enough on the left so that the first icon starts at the same point |
132 // as the labels. We subtract kItemSpacing because there needs to be padding | 132 // as the labels. We subtract kItemSpacing because there needs to be padding |
133 // so we can see the drop indicator. | 133 // so we can see the drop indicator. |
134 return views::MenuItemView::label_start() - | 134 return views::MenuItemView::label_start() - |
135 container_->toolbar_actions_bar()->platform_settings().item_spacing; | 135 container_->toolbar_actions_bar()->platform_settings().item_spacing; |
136 } | 136 } |
137 | 137 |
OLD | NEW |