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

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

Issue 194037: Fix hottracking on button views... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebased Created 11 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 | views/controls/button/custom_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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/views/toolbar_view.h" 5 #include "chrome/browser/views/toolbar_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/drag_drop_types.h" 9 #include "app/drag_drop_types.h"
10 #include "app/gfx/canvas.h" 10 #include "app/gfx/canvas.h"
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 // Notify Access Technology that there was a change in keyboard focus. 612 // Notify Access Technology that there was a change in keyboard focus.
613 ::NotifyWinEvent(EVENT_OBJECT_FOCUS, wnd, OBJID_CLIENT, 613 ::NotifyWinEvent(EVENT_OBJECT_FOCUS, wnd, OBJID_CLIENT,
614 static_cast<LONG>(view_index)); 614 static_cast<LONG>(view_index));
615 #else 615 #else
616 // TODO(port): deal with toolbar a11y focus. 616 // TODO(port): deal with toolbar a11y focus.
617 NOTIMPLEMENTED(); 617 NOTIMPLEMENTED();
618 #endif 618 #endif
619 } 619 }
620 620
621 void ToolbarView::WillLoseFocus() { 621 void ToolbarView::WillLoseFocus() {
622 if (acc_focused_view_) {
623 // Resetting focus state.
624 acc_focused_view_->SetHotTracked(false);
625 }
626 // Any tooltips that are active should be hidden when toolbar loses focus. 622 // Any tooltips that are active should be hidden when toolbar loses focus.
627 if (GetWidget() && GetWidget()->GetTooltipManager()) 623 if (GetWidget() && GetWidget()->GetTooltipManager())
628 GetWidget()->GetTooltipManager()->HideKeyboardTooltip(); 624 GetWidget()->GetTooltipManager()->HideKeyboardTooltip();
629 } 625 }
630 626
631 bool ToolbarView::OnKeyPressed(const views::KeyEvent& e) { 627 bool ToolbarView::OnKeyPressed(const views::KeyEvent& e) {
632 // Paranoia check, button should be initialized upon toolbar gaining focus. 628 // Paranoia check, button should be initialized upon toolbar gaining focus.
633 if (!acc_focused_view_) 629 if (!acc_focused_view_)
634 return false; 630 return false;
635 631
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 app_menu_contents_->AddItem(IDC_ABOUT, 1077 app_menu_contents_->AddItem(IDC_ABOUT,
1082 l10n_util::GetStringFUTF16( 1078 l10n_util::GetStringFUTF16(
1083 IDS_ABOUT, 1079 IDS_ABOUT,
1084 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 1080 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
1085 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); 1081 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE);
1086 app_menu_contents_->AddSeparator(); 1082 app_menu_contents_->AddSeparator();
1087 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT); 1083 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT);
1088 1084
1089 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get())); 1085 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get()));
1090 } 1086 }
OLDNEW
« no previous file with comments | « no previous file | views/controls/button/custom_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698