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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1659203002: Remove HostDesktopType from FindLastActive[WithProfile] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 4 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 } 1835 }
1836 1836
1837 gfx::Rect window_rect = frame_->non_client_view()-> 1837 gfx::Rect window_rect = frame_->non_client_view()->
1838 GetWindowBoundsForClientBounds(*bounds); 1838 GetWindowBoundsForClientBounds(*bounds);
1839 window_rect.set_origin(bounds->origin()); 1839 window_rect.set_origin(bounds->origin());
1840 1840
1841 // When we are given x/y coordinates of 0 on a created popup window, 1841 // When we are given x/y coordinates of 0 on a created popup window,
1842 // assume none were given by the window.open() command. 1842 // assume none were given by the window.open() command.
1843 if (window_rect.x() == 0 && window_rect.y() == 0) { 1843 if (window_rect.x() == 0 && window_rect.y() == 0) {
1844 gfx::Size size = window_rect.size(); 1844 gfx::Size size = window_rect.size();
1845 window_rect.set_origin( 1845 window_rect.set_origin(WindowSizer::GetDefaultPopupOrigin(size));
1846 WindowSizer::GetDefaultPopupOrigin(size,
1847 browser_->host_desktop_type()));
1848 } 1846 }
1849 1847
1850 *bounds = window_rect; 1848 *bounds = window_rect;
1851 *show_state = ui::SHOW_STATE_NORMAL; 1849 *show_state = ui::SHOW_STATE_NORMAL;
1852 } 1850 }
1853 1851
1854 // We return true because we can _always_ locate reasonable bounds using the 1852 // We return true because we can _always_ locate reasonable bounds using the
1855 // WindowSizer, and we don't want to trigger the Window's built-in "size to 1853 // WindowSizer, and we don't want to trigger the Window's built-in "size to
1856 // default" handling because the browser window has no default preferred 1854 // default" handling because the browser window has no default preferred
1857 // size. 1855 // size.
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 return immersive_mode_controller()->IsEnabled(); 2716 return immersive_mode_controller()->IsEnabled();
2719 } 2717 }
2720 2718
2721 views::Widget* BrowserView::GetBubbleAssociatedWidget() { 2719 views::Widget* BrowserView::GetBubbleAssociatedWidget() {
2722 return GetWidget(); 2720 return GetWidget();
2723 } 2721 }
2724 2722
2725 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { 2723 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
2726 return top_container_->GetBoundsInScreen(); 2724 return top_container_->GetBoundsInScreen();
2727 } 2725 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/browser/ui/views/profiles/user_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698