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_bubble_view.h" | 5 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 immersive_mode_controller_->AddObserver(this); | 232 immersive_mode_controller_->AddObserver(this); |
233 UseCompactMargins(); | 233 UseCompactMargins(); |
234 chrome::RecordDialogCreation(chrome::DialogIdentifier::ZOOM); | 234 chrome::RecordDialogCreation(chrome::DialogIdentifier::ZOOM); |
235 } | 235 } |
236 | 236 |
237 ZoomBubbleView::~ZoomBubbleView() { | 237 ZoomBubbleView::~ZoomBubbleView() { |
238 if (immersive_mode_controller_) | 238 if (immersive_mode_controller_) |
239 immersive_mode_controller_->RemoveObserver(this); | 239 immersive_mode_controller_->RemoveObserver(this); |
240 } | 240 } |
241 | 241 |
| 242 int ZoomBubbleView::GetDialogButtons() const { |
| 243 return ui::DIALOG_BUTTON_NONE; |
| 244 } |
| 245 |
242 void ZoomBubbleView::OnGestureEvent(ui::GestureEvent* event) { | 246 void ZoomBubbleView::OnGestureEvent(ui::GestureEvent* event) { |
243 if (!zoom_bubble_ || !zoom_bubble_->auto_close_ || | 247 if (!zoom_bubble_ || !zoom_bubble_->auto_close_ || |
244 event->type() != ui::ET_GESTURE_TAP) { | 248 event->type() != ui::ET_GESTURE_TAP) { |
245 return; | 249 return; |
246 } | 250 } |
247 | 251 |
248 auto_close_ = false; | 252 auto_close_ = false; |
249 StopTimer(); | 253 StopTimer(); |
250 event->SetHandled(); | 254 event->SetHandled(); |
251 } | 255 } |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 &ZoomBubbleView::CloseBubble); | 442 &ZoomBubbleView::CloseBubble); |
439 } | 443 } |
440 | 444 |
441 void ZoomBubbleView::StopTimer() { | 445 void ZoomBubbleView::StopTimer() { |
442 timer_.Stop(); | 446 timer_.Stop(); |
443 } | 447 } |
444 | 448 |
445 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {} | 449 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {} |
446 | 450 |
447 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {} | 451 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {} |
OLD | NEW |