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