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