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

Side by Side Diff: ash/shell/panel_window.cc

Issue 2739553005: Moves maintaining root_window_for_new_windows_ to Shell (Closed)
Patch Set: remove ash:: 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
« no previous file with comments | « ash/shell.cc ('k') | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/shell/panel_window.h" 5 #include "ash/shell/panel_window.h"
6 6
7 #include "ash/common/wm/panels/panel_frame_view.h" 7 #include "ash/common/wm/panels/panel_frame_view.h"
8 #include "ash/public/cpp/window_properties.h" 8 #include "ash/public/cpp/window_properties.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 26 matching lines...) Expand all
37 37
38 PanelWindow::~PanelWindow() {} 38 PanelWindow::~PanelWindow() {}
39 39
40 views::Widget* PanelWindow::CreateWidget() { 40 views::Widget* PanelWindow::CreateWidget() {
41 views::Widget* widget = new views::Widget; 41 views::Widget* widget = new views::Widget;
42 42
43 if (params().bounds.width() == 0) 43 if (params().bounds.width() == 0)
44 params().bounds.set_width(kDefaultWidth); 44 params().bounds.set_width(kDefaultWidth);
45 if (params().bounds.height() == 0) 45 if (params().bounds.height() == 0)
46 params().bounds.set_height(kDefaultHeight); 46 params().bounds.set_height(kDefaultHeight);
47 ::wm::ConvertRectToScreen(Shell::GetTargetRootWindow(), &params().bounds); 47 ::wm::ConvertRectToScreen(Shell::GetRootWindowForNewWindows(),
48 &params().bounds);
48 49
49 widget->Init(params()); 50 widget->Init(params());
50 widget->GetNativeView()->SetName(name_); 51 widget->GetNativeView()->SetName(name_);
51 widget->GetNativeWindow()->SetProperty<int>(kShelfItemTypeKey, 52 widget->GetNativeWindow()->SetProperty<int>(kShelfItemTypeKey,
52 TYPE_APP_PANEL); 53 TYPE_APP_PANEL);
53 widget->Show(); 54 widget->Show();
54 55
55 return widget; 56 return widget;
56 } 57 }
57 58
(...skipping 20 matching lines...) Expand all
78 bool PanelWindow::CanMinimize() const { 79 bool PanelWindow::CanMinimize() const {
79 return false; 80 return false;
80 } 81 }
81 82
82 views::NonClientFrameView* PanelWindow::CreateNonClientFrameView( 83 views::NonClientFrameView* PanelWindow::CreateNonClientFrameView(
83 views::Widget* widget) { 84 views::Widget* widget) {
84 return new PanelFrameView(widget, PanelFrameView::FRAME_NONE); 85 return new PanelFrameView(widget, PanelFrameView::FRAME_NONE);
85 } 86 }
86 87
87 } // namespace ash 88 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/sticky_keys/sticky_keys_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698