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

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

Issue 730833006: MacViews: Implement event monitoring for a specific window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/chrome_page_zoom.h" 10 #include "chrome/browser/chrome_page_zoom.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 browser_view->immersive_mode_controller(), 84 browser_view->immersive_mode_controller(),
85 browser->fullscreen_controller()); 85 browser->fullscreen_controller());
86 86
87 // If the zoom change was initiated by an extension, capture the relevent 87 // If the zoom change was initiated by an extension, capture the relevent
88 // information from it. 88 // information from it.
89 if (extension) 89 if (extension)
90 zoom_bubble_->SetExtensionInfo(extension); 90 zoom_bubble_->SetExtensionInfo(extension);
91 91
92 // If we do not have an anchor view, parent the bubble to the content area. 92 // If we do not have an anchor view, parent the bubble to the content area.
93 if (!anchor_to_view) 93 if (!anchor_to_view)
94 zoom_bubble_->set_parent_window(web_contents->GetTopLevelNativeWindow()); 94 zoom_bubble_->set_parent_window(web_contents->GetNativeView());
95 95
96 views::BubbleDelegateView::CreateBubble(zoom_bubble_); 96 views::BubbleDelegateView::CreateBubble(zoom_bubble_);
97 97
98 // Adjust for fullscreen after creation as it relies on the content size. 98 // Adjust for fullscreen after creation as it relies on the content size.
99 if (is_fullscreen) 99 if (is_fullscreen)
100 zoom_bubble_->AdjustForFullscreen(browser_view->GetBoundsInScreen()); 100 zoom_bubble_->AdjustForFullscreen(browser_view->GetBoundsInScreen());
101 101
102 if (auto_close) 102 if (auto_close)
103 zoom_bubble_->GetWidget()->ShowInactive(); 103 zoom_bubble_->GetWidget()->ShowInactive();
104 else 104 else
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 void ZoomBubbleView::WindowClosing() { 358 void ZoomBubbleView::WindowClosing() {
359 // |zoom_bubble_| can be a new bubble by this point (as Close(); doesn't 359 // |zoom_bubble_| can be a new bubble by this point (as Close(); doesn't
360 // call this right away). Only set to NULL when it's this bubble. 360 // call this right away). Only set to NULL when it's this bubble.
361 if (zoom_bubble_ == this) 361 if (zoom_bubble_ == this)
362 zoom_bubble_ = NULL; 362 zoom_bubble_ = NULL;
363 } 363 }
364 364
365 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {} 365 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {}
366 366
367 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {} 367 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698