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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_ash.cc

Issue 2721153004: Remove ash_util namespace (Closed)
Patch Set: Created 3 years, 9 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/window_sizer/window_sizer.h" 5 #include "chrome/browser/ui/window_sizer/window_sizer.h"
6 6
7 #include "ash/common/wm/window_positioner.h" 7 #include "ash/common/wm/window_positioner.h"
8 #include "ash/common/wm/window_state.h" 8 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_window.h" 9 #include "ash/common/wm_window.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "chrome/browser/ui/ash/ash_util.h" 11 #include "chrome/browser/ui/ash/ash_util.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
14 #include "ui/aura/window.h" 14 #include "ui/aura/window.h"
15 #include "ui/aura/window_event_dispatcher.h" 15 #include "ui/aura/window_event_dispatcher.h"
16 #include "ui/display/display.h" 16 #include "ui/display/display.h"
17 #include "ui/display/screen.h" 17 #include "ui/display/screen.h"
18 18
19 bool WindowSizer::GetBrowserBoundsAsh(gfx::Rect* bounds, 19 bool WindowSizer::GetBrowserBoundsAsh(gfx::Rect* bounds,
20 ui::WindowShowState* show_state) const { 20 ui::WindowShowState* show_state) const {
21 if (!ash_util::ShouldOpenAshOnStartup() || !browser_) 21 if (!ShouldOpenAshOnStartup() || !browser_)
22 return false; 22 return false;
23 23
24 bool determined = false; 24 bool determined = false;
25 if (bounds->IsEmpty()) { 25 if (bounds->IsEmpty()) {
26 if (browser_->is_type_tabbed()) { 26 if (browser_->is_type_tabbed()) {
27 GetTabbedBrowserBoundsAsh(bounds, show_state); 27 GetTabbedBrowserBoundsAsh(bounds, show_state);
28 determined = true; 28 determined = true;
29 } else if (browser_->is_trusted_source()) { 29 } else if (browser_->is_trusted_source()) {
30 // For trusted popups (v1 apps and system windows), do not use the last 30 // For trusted popups (v1 apps and system windows), do not use the last
31 // active window bounds, only use saved or default bounds. 31 // active window bounds, only use saved or default bounds.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // The |browser_window| is non NULL when this is called after 108 // The |browser_window| is non NULL when this is called after
109 // browser's aura window is created. 109 // browser's aura window is created.
110 aura::Window* browser_window = 110 aura::Window* browser_window =
111 browser_->window() ? browser_->window()->GetNativeWindow() : NULL; 111 browser_->window() ? browser_->window()->GetNativeWindow() : NULL;
112 112
113 ash::WindowPositioner::GetBoundsAndShowStateForNewWindow( 113 ash::WindowPositioner::GetBoundsAndShowStateForNewWindow(
114 ash::WmWindow::Get(browser_window), is_saved_bounds, passed_show_state, 114 ash::WmWindow::Get(browser_window), is_saved_bounds, passed_show_state,
115 bounds_in_screen, show_state); 115 bounds_in_screen, show_state);
116 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698