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

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

Issue 2495213006: [top-chrome-md] Made extension buttons show the highlight when focused. (Closed)
Patch Set: Removed unnecessary include. Created 4 years, 1 month 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
« 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_action_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_action_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 return GetThemeProvider()->GetColor( 105 return GetThemeProvider()->GetColor(
106 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); 106 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
107 } 107 }
108 108
109 std::unique_ptr<views::InkDrop> ToolbarActionView::CreateInkDrop() { 109 std::unique_ptr<views::InkDrop> ToolbarActionView::CreateInkDrop() {
110 std::unique_ptr<views::InkDropImpl> ink_drop = 110 std::unique_ptr<views::InkDropImpl> ink_drop =
111 CustomButton::CreateDefaultInkDropImpl(); 111 CustomButton::CreateDefaultInkDropImpl();
112 ink_drop->SetShowHighlightOnHover(!delegate_->ShownInsideMenu()); 112 ink_drop->SetShowHighlightOnHover(!delegate_->ShownInsideMenu());
113 ink_drop->SetShowHighlightOnFocus(true);
113 return std::move(ink_drop); 114 return std::move(ink_drop);
114 } 115 }
115 116
116 content::WebContents* ToolbarActionView::GetCurrentWebContents() const { 117 content::WebContents* ToolbarActionView::GetCurrentWebContents() const {
117 return delegate_->GetCurrentWebContents(); 118 return delegate_->GetCurrentWebContents();
118 } 119 }
119 120
120 void ToolbarActionView::UpdateState() { 121 void ToolbarActionView::UpdateState() {
121 content::WebContents* web_contents = GetCurrentWebContents(); 122 content::WebContents* web_contents = GetCurrentWebContents();
122 if (SessionTabHelper::IdForTab(web_contents) < 0) 123 if (SessionTabHelper::IdForTab(web_contents) < 0)
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (menu_controller->in_nested_run()) { 312 if (menu_controller->in_nested_run()) {
312 // There is another menu showing. Close the outermost menu (since we are 313 // There is another menu showing. Close the outermost menu (since we are
313 // shown in the same menu, we don't want to close the whole thing). 314 // shown in the same menu, we don't want to close the whole thing).
314 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 315 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
315 return true; 316 return true;
316 } 317 }
317 } 318 }
318 319
319 return false; 320 return false;
320 } 321 }
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