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

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

Issue 11419227: touch: Fix ctrl+taps for buttons on bookmark bar and toolbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « chrome/browser/ui/views/reload_button.cc ('k') | ui/views/controls/button/button.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 button->SetEnabled(enabled); 511 button->SetEnabled(enabled);
512 } 512 }
513 513
514 //////////////////////////////////////////////////////////////////////////////// 514 ////////////////////////////////////////////////////////////////////////////////
515 // ToolbarView, views::Button::ButtonListener implementation: 515 // ToolbarView, views::Button::ButtonListener implementation:
516 516
517 void ToolbarView::ButtonPressed(views::Button* sender, 517 void ToolbarView::ButtonPressed(views::Button* sender,
518 const ui::Event& event) { 518 const ui::Event& event) {
519 int command = sender->tag(); 519 int command = sender->tag();
520 WindowOpenDisposition disposition = 520 WindowOpenDisposition disposition =
521 chrome::DispositionFromEventFlags(sender->mouse_event_flags()); 521 chrome::DispositionFromEventFlags(event.flags());
522 if ((disposition == CURRENT_TAB) && 522 if ((disposition == CURRENT_TAB) &&
523 ((command == IDC_BACK) || (command == IDC_FORWARD))) { 523 ((command == IDC_BACK) || (command == IDC_FORWARD))) {
524 // Forcibly reset the location bar, since otherwise it won't discard any 524 // Forcibly reset the location bar, since otherwise it won't discard any
525 // ongoing user edits, since it doesn't realize this is a user-initiated 525 // ongoing user edits, since it doesn't realize this is a user-initiated
526 // action. 526 // action.
527 location_bar_->Revert(); 527 location_bar_->Revert();
528 } 528 }
529 chrome::ExecuteCommandWithDisposition(browser_, command, disposition); 529 chrome::ExecuteCommandWithDisposition(browser_, command, disposition);
530 } 530 }
531 531
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL)); 901 app_menu_->SetIcon(GetAppMenuIcon(views::CustomButton::STATE_NORMAL));
902 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED)); 902 app_menu_->SetHoverIcon(GetAppMenuIcon(views::CustomButton::STATE_HOVERED));
903 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED)); 903 app_menu_->SetPushedIcon(GetAppMenuIcon(views::CustomButton::STATE_PRESSED));
904 SchedulePaint(); 904 SchedulePaint();
905 } 905 }
906 906
907 void ToolbarView::OnShowHomeButtonChanged() { 907 void ToolbarView::OnShowHomeButtonChanged() {
908 Layout(); 908 Layout();
909 SchedulePaint(); 909 SchedulePaint();
910 } 910 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/reload_button.cc ('k') | ui/views/controls/button/button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698