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/zoom_view.h" | 5 #include "chrome/browser/ui/views/location_bar/zoom_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 7 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
8 #include "chrome/browser/ui/view_ids.h" | 8 #include "chrome/browser/ui/view_ids.h" |
9 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" | 9 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
10 #include "chrome/browser/ui/zoom/zoom_controller.h" | 10 #include "chrome/browser/ui/zoom/zoom_controller.h" |
11 #include "grit/generated_resources.h" | 11 #include "chrome/grit/generated_resources.h" |
12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
13 #include "ui/accessibility/ax_view_state.h" | 13 #include "ui/accessibility/ax_view_state.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/events/event.h" | 16 #include "ui/events/event.h" |
17 #include "ui/gfx/size.h" | 17 #include "ui/gfx/size.h" |
18 | 18 |
19 ZoomView::ZoomView(LocationBarView::Delegate* location_bar_delegate) | 19 ZoomView::ZoomView(LocationBarView::Delegate* location_bar_delegate) |
20 : location_bar_delegate_(location_bar_delegate) { | 20 : location_bar_delegate_(location_bar_delegate) { |
21 SetAccessibilityFocusable(true); | 21 SetAccessibilityFocusable(true); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void ZoomView::OnGestureEvent(ui::GestureEvent* event) { | 74 void ZoomView::OnGestureEvent(ui::GestureEvent* event) { |
75 if (event->type() == ui::ET_GESTURE_TAP) { | 75 if (event->type() == ui::ET_GESTURE_TAP) { |
76 ActivateBubble(); | 76 ActivateBubble(); |
77 event->SetHandled(); | 77 event->SetHandled(); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 void ZoomView::ActivateBubble() { | 81 void ZoomView::ActivateBubble() { |
82 ZoomBubbleView::ShowBubble(location_bar_delegate_->GetWebContents(), false); | 82 ZoomBubbleView::ShowBubble(location_bar_delegate_->GetWebContents(), false); |
83 } | 83 } |
OLD | NEW |