| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 chrome::AddCommandObserver(browser_, IDC_FORWARD, this); | 148 chrome::AddCommandObserver(browser_, IDC_FORWARD, this); |
| 149 chrome::AddCommandObserver(browser_, IDC_RELOAD, this); | 149 chrome::AddCommandObserver(browser_, IDC_RELOAD, this); |
| 150 chrome::AddCommandObserver(browser_, IDC_HOME, this); | 150 chrome::AddCommandObserver(browser_, IDC_HOME, this); |
| 151 chrome::AddCommandObserver(browser_, IDC_LOAD_NEW_TAB_PAGE, this); | 151 chrome::AddCommandObserver(browser_, IDC_LOAD_NEW_TAB_PAGE, this); |
| 152 | 152 |
| 153 display_mode_ = DISPLAYMODE_LOCATION; | 153 display_mode_ = DISPLAYMODE_LOCATION; |
| 154 if (browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) || | 154 if (browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP) || |
| 155 (browser->is_app() && IsStreamlinedHostedAppsEnabled())) | 155 (browser->is_app() && IsStreamlinedHostedAppsEnabled())) |
| 156 display_mode_ = DISPLAYMODE_NORMAL; | 156 display_mode_ = DISPLAYMODE_NORMAL; |
| 157 | 157 |
| 158 registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, | |
| 159 content::NotificationService::AllSources()); | |
| 160 if (OutdatedUpgradeBubbleView::IsAvailable()) { | 158 if (OutdatedUpgradeBubbleView::IsAvailable()) { |
| 161 registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL, | 159 registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL, |
| 162 content::NotificationService::AllSources()); | 160 content::NotificationService::AllSources()); |
| 163 registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, | 161 registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU, |
| 164 content::NotificationService::AllSources()); | 162 content::NotificationService::AllSources()); |
| 165 } | 163 } |
| 166 #if defined(OS_WIN) | 164 #if defined(OS_WIN) |
| 167 registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED, | 165 registrar_.Add(this, chrome::NOTIFICATION_CRITICAL_UPGRADE_INSTALLED, |
| 168 content::NotificationService::AllSources()); | 166 content::NotificationService::AllSources()); |
| 169 #endif | 167 #endif |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 | 787 |
| 790 void ToolbarView::OnShowHomeButtonChanged() { | 788 void ToolbarView::OnShowHomeButtonChanged() { |
| 791 Layout(); | 789 Layout(); |
| 792 SchedulePaint(); | 790 SchedulePaint(); |
| 793 } | 791 } |
| 794 | 792 |
| 795 int ToolbarView::content_shadow_height() const { | 793 int ToolbarView::content_shadow_height() const { |
| 796 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? | 794 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? |
| 797 kContentShadowHeightAsh : kContentShadowHeight; | 795 kContentShadowHeightAsh : kContentShadowHeight; |
| 798 } | 796 } |
| OLD | NEW |