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/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 browser_actions_(nullptr), | 129 browser_actions_(nullptr), |
130 app_menu_button_(nullptr), | 130 app_menu_button_(nullptr), |
131 browser_(browser), | 131 browser_(browser), |
132 badge_controller_(browser->profile(), this), | 132 badge_controller_(browser->profile(), this), |
133 display_mode_(browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) | 133 display_mode_(browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) |
134 ? DISPLAYMODE_NORMAL | 134 ? DISPLAYMODE_NORMAL |
135 : DISPLAYMODE_LOCATION) { | 135 : DISPLAYMODE_LOCATION) { |
136 set_id(VIEW_ID_TOOLBAR); | 136 set_id(VIEW_ID_TOOLBAR); |
137 | 137 |
138 SetEventTargeter( | 138 SetEventTargeter( |
139 scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this))); | 139 std::unique_ptr<views::ViewTargeter>(new views::ViewTargeter(this))); |
140 | 140 |
141 chrome::AddCommandObserver(browser_, IDC_BACK, this); | 141 chrome::AddCommandObserver(browser_, IDC_BACK, this); |
142 chrome::AddCommandObserver(browser_, IDC_FORWARD, this); | 142 chrome::AddCommandObserver(browser_, IDC_FORWARD, this); |
143 chrome::AddCommandObserver(browser_, IDC_RELOAD, this); | 143 chrome::AddCommandObserver(browser_, IDC_RELOAD, this); |
144 chrome::AddCommandObserver(browser_, IDC_HOME, this); | 144 chrome::AddCommandObserver(browser_, IDC_HOME, this); |
145 chrome::AddCommandObserver(browser_, IDC_LOAD_NEW_TAB_PAGE, this); | 145 chrome::AddCommandObserver(browser_, IDC_LOAD_NEW_TAB_PAGE, this); |
146 | 146 |
147 if (OutdatedUpgradeBubbleView::IsAvailable()) { | 147 if (OutdatedUpgradeBubbleView::IsAvailable()) { |
148 registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL, | 148 registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL, |
149 content::NotificationService::AllSources()); | 149 content::NotificationService::AllSources()); |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 SchedulePaint(); | 797 SchedulePaint(); |
798 } | 798 } |
799 | 799 |
800 int ToolbarView::content_shadow_height() const { | 800 int ToolbarView::content_shadow_height() const { |
801 #if defined(USE_ASH) | 801 #if defined(USE_ASH) |
802 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH); | 802 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH); |
803 #else | 803 #else |
804 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT); | 804 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT); |
805 #endif | 805 #endif |
806 } | 806 } |
OLD | NEW |