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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer_gtk.cc

Issue 10836218: Remove BrowserList::GetLastActive calls from window_sizer.cc et al. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/window_sizer/window_sizer_gtk.cc
diff --git a/chrome/browser/ui/window_sizer/window_sizer_gtk.cc b/chrome/browser/ui/window_sizer/window_sizer_gtk.cc
index 9abe4116b65ecaef2f050c652104ab555ec2633e..526f0ea863680bb1b228852cd6d87e7ae503eae6 100644
--- a/chrome/browser/ui/window_sizer/window_sizer_gtk.cc
+++ b/chrome/browser/ui/window_sizer/window_sizer_gtk.cc
@@ -8,8 +8,9 @@
#include "base/logging.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/host_desktop.h"
#include "ui/gfx/screen.h"
// Used to pad the default new window size. On Windows, this is also used for
@@ -19,10 +20,12 @@
const int WindowSizer::kWindowTilePixels = 10;
// static
-gfx::Point WindowSizer::GetDefaultPopupOrigin(const gfx::Size& size) {
+gfx::Point WindowSizer::GetDefaultPopupOrigin(const gfx::Size& size,
+ chrome::HostDesktopType type) {
gfx::Rect monitor_bounds = gfx::Screen::GetPrimaryDisplay().work_area();
gfx::Point corner(monitor_bounds.x(), monitor_bounds.y());
- if (Browser* browser = BrowserList::GetLastActive()) {
+
+ if (Browser* browser = browser::FindLastActiveWithHostDesktopType(type)) {
GtkWindow* window =
reinterpret_cast<GtkWindow*>(browser->window()->GetNativeWindow());
int x = 0, y = 0;
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_aura.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698