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

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

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/i18n/number_formatting.h" 9 #include "base/i18n/number_formatting.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON); 203 ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON);
204 home_->set_tag(IDC_HOME); 204 home_->set_tag(IDC_HOME);
205 home_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME)); 205 home_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME));
206 home_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME)); 206 home_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME));
207 home_->set_id(VIEW_ID_HOME_BUTTON); 207 home_->set_id(VIEW_ID_HOME_BUTTON);
208 home_->Init(); 208 home_->Init();
209 209
210 browser_actions_ = new BrowserActionsContainer(browser_, this); 210 browser_actions_ = new BrowserActionsContainer(browser_, this);
211 211
212 app_menu_ = new WrenchToolbarButton(this); 212 app_menu_ = new WrenchToolbarButton(this);
213 app_menu_->set_border(NULL); 213 app_menu_->SetBorder(views::Border::NullBorder());
214 app_menu_->EnableCanvasFlippingForRTLUI(true); 214 app_menu_->EnableCanvasFlippingForRTLUI(true);
215 app_menu_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_APP)); 215 app_menu_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_APP));
216 app_menu_->SetTooltipText(l10n_util::GetStringUTF16(IDS_APPMENU_TOOLTIP)); 216 app_menu_->SetTooltipText(l10n_util::GetStringUTF16(IDS_APPMENU_TOOLTIP));
217 app_menu_->set_id(VIEW_ID_APP_MENU); 217 app_menu_->set_id(VIEW_ID_APP_MENU);
218 218
219 // Always add children in order from left to right, for accessibility. 219 // Always add children in order from left to right, for accessibility.
220 site_chip_view_ = new SiteChipView(this); 220 site_chip_view_ = new SiteChipView(this);
221 chrome::OriginChipPosition origin_chip_position = 221 chrome::OriginChipPosition origin_chip_position =
222 chrome::GetOriginChipPosition(); 222 chrome::GetOriginChipPosition();
223 AddChildView(back_); 223 AddChildView(back_);
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 void ToolbarView::OnShowHomeButtonChanged() { 827 void ToolbarView::OnShowHomeButtonChanged() {
828 Layout(); 828 Layout();
829 SchedulePaint(); 829 SchedulePaint();
830 } 830 }
831 831
832 int ToolbarView::content_shadow_height() const { 832 int ToolbarView::content_shadow_height() const {
833 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? 833 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ?
834 kContentShadowHeightAsh : kContentShadowHeight; 834 kContentShadowHeightAsh : kContentShadowHeight;
835 } 835 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | chrome/browser/ui/views/toolbar/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698