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/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
11 #include "components/ui/zoom/zoom_controller.h" | 11 #include "components/ui/zoom/zoom_controller.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 : BubbleIconView(nullptr, 0), | 20 : BubbleIconView(nullptr, 0, 0), |
21 location_bar_delegate_(location_bar_delegate) { | 21 location_bar_delegate_(location_bar_delegate) { |
22 Update(NULL); | 22 Update(NULL); |
23 } | 23 } |
24 | 24 |
25 ZoomView::~ZoomView() { | 25 ZoomView::~ZoomView() { |
26 } | 26 } |
27 | 27 |
28 void ZoomView::Update(ui_zoom::ZoomController* zoom_controller) { | 28 void ZoomView::Update(ui_zoom::ZoomController* zoom_controller) { |
29 if (!zoom_controller || zoom_controller->IsAtDefaultZoom() || | 29 if (!zoom_controller || zoom_controller->IsAtDefaultZoom() || |
30 location_bar_delegate_->GetToolbarModel()->input_in_progress()) { | 30 location_bar_delegate_->GetToolbarModel()->input_in_progress()) { |
(...skipping 21 matching lines...) Expand all Loading... |
52 } | 52 } |
53 | 53 |
54 void ZoomView::OnExecuting(BubbleIconView::ExecuteSource source) { | 54 void ZoomView::OnExecuting(BubbleIconView::ExecuteSource source) { |
55 ZoomBubbleView::ShowBubble(location_bar_delegate_->GetWebContents(), false); | 55 ZoomBubbleView::ShowBubble(location_bar_delegate_->GetWebContents(), false); |
56 } | 56 } |
57 | 57 |
58 void ZoomView::GetAccessibleState(ui::AXViewState* state) { | 58 void ZoomView::GetAccessibleState(ui::AXViewState* state) { |
59 BubbleIconView::GetAccessibleState(state); | 59 BubbleIconView::GetAccessibleState(state); |
60 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_ZOOM); | 60 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_ZOOM); |
61 } | 61 } |
OLD | NEW |