Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc

Issue 2905243003: Cleanup BookmarkBubbleView, remove LocationBarBubbleDelegateView::GetDialogButtons() (Closed)
Patch Set: neater Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // TODO(tapted): The zoom bubble should expose its cancel (reset) button to
244 // DialogDelegate, but it does not want DialogClientView to create it.
Peter Kasting 2017/05/26 16:29:18 I'm not really sure what this TODO is saying we sh
tapted 2017/05/27 00:18:49 Hm. This would be a consistency thing - exposing r
Peter Kasting 2017/05/27 00:28:45 If we want this button to work like a cancel butto
tapted 2017/05/27 01:09:39 Yeah.. I'll likely want to play with DialogModel s
245 return ui::DIALOG_BUTTON_NONE;
246 }
247
242 void ZoomBubbleView::OnGestureEvent(ui::GestureEvent* event) { 248 void ZoomBubbleView::OnGestureEvent(ui::GestureEvent* event) {
243 if (!zoom_bubble_ || !zoom_bubble_->auto_close_ || 249 if (!zoom_bubble_ || !zoom_bubble_->auto_close_ ||
244 event->type() != ui::ET_GESTURE_TAP) { 250 event->type() != ui::ET_GESTURE_TAP) {
245 return; 251 return;
246 } 252 }
247 253
248 auto_close_ = false; 254 auto_close_ = false;
249 StopTimer(); 255 StopTimer();
250 event->SetHandled(); 256 event->SetHandled();
251 } 257 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 &ZoomBubbleView::CloseBubble); 444 &ZoomBubbleView::CloseBubble);
439 } 445 }
440 446
441 void ZoomBubbleView::StopTimer() { 447 void ZoomBubbleView::StopTimer() {
442 timer_.Stop(); 448 timer_.Stop();
443 } 449 }
444 450
445 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {} 451 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {}
446 452
447 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {} 453 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698