Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 503783002: Remove registration in toolbar_view.cc for unused notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698