OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/location_bar/star_view.h" | 5 #include "chrome/browser/ui/views/location_bar/star_view.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/bookmarks/bookmark_utils.h" | 10 #include "chrome/browser/bookmarks/bookmark_utils.h" |
11 #include "chrome/browser/command_updater.h" | 11 #include "chrome/browser/command_updater.h" |
12 #include "chrome/browser/ui/view_ids.h" | 12 #include "chrome/browser/ui/view_ids.h" |
13 #include "chrome/browser/ui/views/browser_dialogs.h" | 13 #include "chrome/browser/ui/views/browser_dialogs.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 #include "ui/base/accessibility/accessible_view_state.h" | 16 #include "ui/base/accessibility/accessible_view_state.h" |
17 #include "ui/base/events/event.h" | 17 #include "ui/base/events/event.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 void StarView::OnGestureEvent(ui::GestureEvent* event) { | 96 void StarView::OnGestureEvent(ui::GestureEvent* event) { |
97 if (event->type() == ui::ET_GESTURE_TAP) { | 97 if (event->type() == ui::ET_GESTURE_TAP) { |
98 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint", | 98 UMA_HISTOGRAM_ENUMERATION("Bookmarks.EntryPoint", |
99 bookmark_utils::ENTRY_POINT_STAR_GESTURE, | 99 bookmark_utils::ENTRY_POINT_STAR_GESTURE, |
100 bookmark_utils::ENTRY_POINT_LIMIT); | 100 bookmark_utils::ENTRY_POINT_LIMIT); |
101 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE_FROM_STAR); | 101 command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE_FROM_STAR); |
102 event->SetHandled(); | 102 event->SetHandled(); |
103 } | 103 } |
104 } | 104 } |
OLD | NEW |