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

Side by Side Diff: chrome/browser/ui/views/location_bar/bubble_icon_view.cc

Issue 247193002: Remove touch layout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/location_bar/bubble_icon_view.h" 5 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h"
6 6
7 #include "chrome/browser/command_updater.h" 7 #include "chrome/browser/command_updater.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "ui/accessibility/ax_view_state.h" 8 #include "ui/accessibility/ax_view_state.h"
10 #include "ui/events/event.h" 9 #include "ui/events/event.h"
11 10
12 BubbleIconView::BubbleIconView(CommandUpdater* command_updater, int command_id) 11 BubbleIconView::BubbleIconView(CommandUpdater* command_updater, int command_id)
13 : command_updater_(command_updater), 12 : command_updater_(command_updater),
14 command_id_(command_id), 13 command_id_(command_id),
15 suppress_mouse_released_action_(false) { 14 suppress_mouse_released_action_(false) {
16 SetAccessibilityFocusable(true); 15 SetAccessibilityFocusable(true);
17 LocationBarView::InitTouchableLocationBarChildView(this);
18 } 16 }
19 17
20 BubbleIconView::~BubbleIconView() { 18 BubbleIconView::~BubbleIconView() {
21 } 19 }
22 20
23 void BubbleIconView::GetAccessibleState(ui::AXViewState* state) { 21 void BubbleIconView::GetAccessibleState(ui::AXViewState* state) {
24 views::ImageView::GetAccessibleState(state); 22 views::ImageView::GetAccessibleState(state);
25 state->role = ui::AX_ROLE_BUTTON; 23 state->role = ui::AX_ROLE_BUTTON;
26 } 24 }
27 25
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return false; 65 return false;
68 } 66 }
69 67
70 void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) { 68 void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) {
71 if (event->type() == ui::ET_GESTURE_TAP) { 69 if (event->type() == ui::ET_GESTURE_TAP) {
72 OnExecuting(EXECUTE_SOURCE_GESTURE); 70 OnExecuting(EXECUTE_SOURCE_GESTURE);
73 command_updater_->ExecuteCommand(command_id_); 71 command_updater_->ExecuteCommand(command_id_);
74 event->SetHandled(); 72 event->SetHandled();
75 } 73 }
76 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698