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

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

Issue 2834493007: MacViews: Allows the toolkit-views Zoom Dialog to be used (Closed)
Patch Set: MacViews: Allows the toolkit-views Zoom Dialog to be used (keep anchoring) Created 3 years, 8 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/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 void LocationBarView::ZoomChangedForActiveTab(bool can_show_bubble) { 315 void LocationBarView::ZoomChangedForActiveTab(bool can_show_bubble) {
316 DCHECK(zoom_view_); 316 DCHECK(zoom_view_);
317 if (RefreshZoomView()) { 317 if (RefreshZoomView()) {
318 Layout(); 318 Layout();
319 SchedulePaint(); 319 SchedulePaint();
320 } 320 }
321 321
322 WebContents* web_contents = GetWebContents(); 322 WebContents* web_contents = GetWebContents();
323 if (can_show_bubble && zoom_view_->visible() && web_contents) 323 if (can_show_bubble && zoom_view_->visible() && web_contents)
324 ZoomBubbleView::ShowBubble(web_contents, ZoomBubbleView::AUTOMATIC); 324 ZoomBubbleView::ShowBubble(web_contents, gfx::Point(),
325 ZoomBubbleView::AUTOMATIC);
325 } 326 }
326 327
327 void LocationBarView::SetStarToggled(bool on) { 328 void LocationBarView::SetStarToggled(bool on) {
328 if (star_view_) 329 if (star_view_)
329 star_view_->SetToggled(on); 330 star_view_->SetToggled(on);
330 } 331 }
331 332
332 gfx::Point LocationBarView::GetOmniboxViewOrigin() const { 333 gfx::Point LocationBarView::GetOmniboxViewOrigin() const {
333 gfx::Point origin(omnibox_view_->origin()); 334 gfx::Point origin(omnibox_view_->origin());
334 origin.set_x(GetMirroredXInView(origin.x())); 335 origin.set_x(GetMirroredXInView(origin.x()));
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 // LocationBarView, private TemplateURLServiceObserver implementation: 1041 // LocationBarView, private TemplateURLServiceObserver implementation:
1041 1042
1042 void LocationBarView::OnTemplateURLServiceChanged() { 1043 void LocationBarView::OnTemplateURLServiceChanged() {
1043 template_url_service_->RemoveObserver(this); 1044 template_url_service_->RemoveObserver(this);
1044 template_url_service_ = nullptr; 1045 template_url_service_ = nullptr;
1045 // If the browser is no longer active, let's not show the info bubble, as this 1046 // If the browser is no longer active, let's not show the info bubble, as this
1046 // would make the browser the active window again. 1047 // would make the browser the active window again.
1047 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive()) 1048 if (omnibox_view_ && omnibox_view_->GetWidget()->IsActive())
1048 ShowFirstRunBubble(); 1049 ShowFirstRunBubble();
1049 } 1050 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs_views_mac.cc ('k') | chrome/browser/ui/views/location_bar/zoom_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698