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

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

Issue 11742003: Implemented drop hander for the Home toolbar button that accepts (only) links (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_view.h" 5 #include "chrome/browser/ui/views/toolbar_view.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/command_updater.h" 10 #include "chrome/browser/command_updater.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 LocationBarView::POPUP : LocationBarView::NORMAL); 239 LocationBarView::POPUP : LocationBarView::NORMAL);
240 240
241 reload_ = new ReloadButton(location_bar_, 241 reload_ = new ReloadButton(location_bar_,
242 browser_->command_controller()->command_updater()); 242 browser_->command_controller()->command_updater());
243 reload_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | 243 reload_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON |
244 ui::EF_MIDDLE_MOUSE_BUTTON); 244 ui::EF_MIDDLE_MOUSE_BUTTON);
245 reload_->set_tag(IDC_RELOAD); 245 reload_->set_tag(IDC_RELOAD);
246 reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)); 246 reload_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD));
247 reload_->set_id(VIEW_ID_RELOAD_BUTTON); 247 reload_->set_id(VIEW_ID_RELOAD_BUTTON);
248 248
249 home_ = new views::ImageButton(this); 249 home_ = new HomeImageButton(this, browser_);
250 home_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON | 250 home_->set_triggerable_event_flags(ui::EF_LEFT_MOUSE_BUTTON |
251 ui::EF_MIDDLE_MOUSE_BUTTON); 251 ui::EF_MIDDLE_MOUSE_BUTTON);
252 home_->set_tag(IDC_HOME); 252 home_->set_tag(IDC_HOME);
253 home_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME)); 253 home_->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME));
254 home_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME)); 254 home_->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME));
255 home_->set_id(VIEW_ID_HOME_BUTTON); 255 home_->set_id(VIEW_ID_HOME_BUTTON);
256 256
257 browser_actions_ = new BrowserActionsContainer(browser_, this); 257 browser_actions_ = new BrowserActionsContainer(browser_, this);
258 258
259 #if defined(OS_WIN) && !defined(USE_AURA) 259 #if defined(OS_WIN) && !defined(USE_AURA)
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL)); 904 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL));
905 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED)); 905 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED));
906 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED)); 906 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED));
907 SchedulePaint(); 907 SchedulePaint();
908 } 908 }
909 909
910 void ToolbarView::OnShowHomeButtonChanged() { 910 void ToolbarView::OnShowHomeButtonChanged() {
911 Layout(); 911 Layout();
912 SchedulePaint(); 912 SchedulePaint();
913 } 913 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698