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

Side by Side Diff: chrome/browser/ui/views/apps/native_app_window_views.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/native_app_window_views.h" 5 #include "chrome/browser/ui/views/apps/native_app_window_views.h"
6 6
7 #include "apps/ui/views/shell_window_frame_view.h" 7 #include "apps/ui/views/shell_window_frame_view.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #if defined(USE_ASH) 42 #if defined(USE_ASH)
43 #include "ash/ash_constants.h" 43 #include "ash/ash_constants.h"
44 #include "ash/screen_ash.h" 44 #include "ash/screen_ash.h"
45 #include "ash/shell.h" 45 #include "ash/shell.h"
46 #include "ash/wm/custom_frame_view_ash.h" 46 #include "ash/wm/custom_frame_view_ash.h"
47 #include "ash/wm/panels/panel_frame_view.h" 47 #include "ash/wm/panels/panel_frame_view.h"
48 #include "ash/wm/window_state.h" 48 #include "ash/wm/window_state.h"
49 #include "chrome/browser/ui/ash/ash_util.h" 49 #include "chrome/browser/ui/ash/ash_util.h"
50 #include "ui/aura/client/aura_constants.h" 50 #include "ui/aura/client/aura_constants.h"
51 #include "ui/aura/client/window_tree_client.h" 51 #include "ui/aura/client/window_tree_client.h"
52 #include "ui/aura/root_window.h"
53 #include "ui/aura/window.h" 52 #include "ui/aura/window.h"
54 #endif 53 #endif
55 54
56 using apps::ShellWindow; 55 using apps::ShellWindow;
57 56
58 namespace { 57 namespace {
59 58
60 const int kMinPanelWidth = 100; 59 const int kMinPanelWidth = 100;
61 const int kMinPanelHeight = 100; 60 const int kMinPanelHeight = 100;
62 const int kDefaultPanelWidth = 200; 61 const int kDefaultPanelWidth = 200;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 else if (preferred_size_.width() < kMinPanelWidth) 260 else if (preferred_size_.width() < kMinPanelWidth)
262 preferred_size_.set_width(kMinPanelWidth); 261 preferred_size_.set_width(kMinPanelWidth);
263 262
264 if (preferred_size_.height() == 0) 263 if (preferred_size_.height() == 0)
265 preferred_size_.set_height(kDefaultPanelHeight); 264 preferred_size_.set_height(kDefaultPanelHeight);
266 else if (preferred_size_.height() < kMinPanelHeight) 265 else if (preferred_size_.height() < kMinPanelHeight)
267 preferred_size_.set_height(kMinPanelHeight); 266 preferred_size_.set_height(kMinPanelHeight);
268 #if defined(USE_ASH) 267 #if defined(USE_ASH)
269 if (ash::Shell::HasInstance()) { 268 if (ash::Shell::HasInstance()) {
270 // Open a new panel on the target root. 269 // Open a new panel on the target root.
271 aura::RootWindow* target = ash::Shell::GetTargetRootWindow(); 270 aura::Window* target = ash::Shell::GetTargetRootWindow();
272 params.bounds = ash::ScreenAsh::ConvertRectToScreen( 271 params.bounds = ash::ScreenAsh::ConvertRectToScreen(
273 target, gfx::Rect(preferred_size_)); 272 target, gfx::Rect(preferred_size_));
274 } else { 273 } else {
275 params.bounds = gfx::Rect(preferred_size_); 274 params.bounds = gfx::Rect(preferred_size_);
276 } 275 }
277 #else 276 #else
278 params.bounds = gfx::Rect(preferred_size_); 277 params.bounds = gfx::Rect(preferred_size_);
279 #endif 278 #endif
280 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically 279 // TODO(erg): Conceptually, these are toplevel windows, but we theoretically
281 // could plumb context through to here in some cases. 280 // could plumb context through to here in some cases.
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 return window_bounds.InsetsFrom(client_bounds); 831 return window_bounds.InsetsFrom(client_bounds);
833 } 832 }
834 833
835 bool NativeAppWindowViews::IsVisible() const { 834 bool NativeAppWindowViews::IsVisible() const {
836 return window_->IsVisible(); 835 return window_->IsVisible();
837 } 836 }
838 837
839 void NativeAppWindowViews::HideWithApp() {} 838 void NativeAppWindowViews::HideWithApp() {}
840 void NativeAppWindowViews::ShowWithApp() {} 839 void NativeAppWindowViews::ShowWithApp() {}
841 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} 840 void NativeAppWindowViews::UpdateWindowMinMaxSize() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc ('k') | chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698