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

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

Issue 1402363013: Update location bar bubble/icon behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // If we do not have an anchor view, parent the bubble to the content area. 81 // If we do not have an anchor view, parent the bubble to the content area.
82 if (!anchor_to_view) 82 if (!anchor_to_view)
83 zoom_bubble_->set_parent_window(web_contents->GetNativeView()); 83 zoom_bubble_->set_parent_window(web_contents->GetNativeView());
84 84
85 views::BubbleDelegateView::CreateBubble(zoom_bubble_); 85 views::BubbleDelegateView::CreateBubble(zoom_bubble_);
86 86
87 // Adjust for fullscreen after creation as it relies on the content size. 87 // Adjust for fullscreen after creation as it relies on the content size.
88 if (is_fullscreen) 88 if (is_fullscreen)
89 zoom_bubble_->AdjustForFullscreen(browser_view->GetBoundsInScreen()); 89 zoom_bubble_->AdjustForFullscreen(browser_view->GetBoundsInScreen());
90 90
91 if (auto_close) 91 zoom_bubble_->ShowForReason(auto_close ? AUTOMATIC : USER_ACTION);
92 zoom_bubble_->GetWidget()->ShowInactive();
93 else
94 zoom_bubble_->GetWidget()->Show();
95 } 92 }
96 93
97 // static 94 // static
98 void ZoomBubbleView::CloseBubble() { 95 void ZoomBubbleView::CloseBubble() {
99 if (zoom_bubble_) 96 if (zoom_bubble_)
100 zoom_bubble_->Close(); 97 zoom_bubble_->Close();
101 } 98 }
102 99
103 // static 100 // static
104 ZoomBubbleView* ZoomBubbleView::GetZoomBubble() { 101 ZoomBubbleView* ZoomBubbleView::GetZoomBubble() {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 311 }
315 } 312 }
316 313
317 void ZoomBubbleView::StopTimer() { 314 void ZoomBubbleView::StopTimer() {
318 timer_.Stop(); 315 timer_.Stop();
319 } 316 }
320 317
321 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {} 318 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {}
322 319
323 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {} 320 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698