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/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
8 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" | 8 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
9 #include "chrome/grit/generated_resources.h" | 9 #include "chrome/grit/generated_resources.h" |
10 #include "components/toolbar/toolbar_model.h" | 10 #include "components/toolbar/toolbar_model.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 ui_zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM | 41 ui_zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM |
42 ? gfx::VectorIconId::ZOOM_MINUS | 42 ? gfx::VectorIconId::ZOOM_MINUS |
43 : gfx::VectorIconId::ZOOM_PLUS; | 43 : gfx::VectorIconId::ZOOM_PLUS; |
44 if (GetNativeTheme()) | 44 if (GetNativeTheme()) |
45 UpdateIcon(); | 45 UpdateIcon(); |
46 | 46 |
47 SetVisible(true); | 47 SetVisible(true); |
48 } | 48 } |
49 | 49 |
50 void ZoomView::OnExecuting(BubbleIconView::ExecuteSource source) { | 50 void ZoomView::OnExecuting(BubbleIconView::ExecuteSource source) { |
51 ZoomBubbleView::ShowBubble(location_bar_delegate_->GetWebContents(), false); | 51 ZoomBubbleView::ShowBubble(location_bar_delegate_->GetWebContents(), |
| 52 ZoomBubbleView::USER_GESTURE); |
52 } | 53 } |
53 | 54 |
54 void ZoomView::GetAccessibleState(ui::AXViewState* state) { | 55 void ZoomView::GetAccessibleState(ui::AXViewState* state) { |
55 BubbleIconView::GetAccessibleState(state); | 56 BubbleIconView::GetAccessibleState(state); |
56 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_ZOOM); | 57 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_ZOOM); |
57 } | 58 } |
58 | 59 |
59 views::BubbleDelegateView* ZoomView::GetBubble() const { | 60 views::BubbleDelegateView* ZoomView::GetBubble() const { |
60 return ZoomBubbleView::GetZoomBubble(); | 61 return ZoomBubbleView::GetZoomBubble(); |
61 } | 62 } |
62 | 63 |
63 gfx::VectorIconId ZoomView::GetVectorIcon() const { | 64 gfx::VectorIconId ZoomView::GetVectorIcon() const { |
64 return image_id_; | 65 return image_id_; |
65 } | 66 } |
OLD | NEW |