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

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

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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
« no previous file with comments | « ash/shell/content_client/shell_browser_main_parts.cc ('k') | ash/shell_unittest.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.h" 5 #include "ash/shell.h"
6 #include "ash/shell_delegate.h" 6 #include "ash/shell_delegate.h"
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "ash/shell/example_factory.h" 8 #include "ash/shell/example_factory.h"
9 #include "ash/tooltips/tooltip_controller.h" 9 #include "ash/tooltips/tooltip_controller.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 DISALLOW_COPY_AND_ASSIGN(LockView); 79 DISALLOW_COPY_AND_ASSIGN(LockView);
80 }; 80 };
81 81
82 void CreateLockScreen() { 82 void CreateLockScreen() {
83 LockView* lock_view = new LockView; 83 LockView* lock_view = new LockView;
84 views::Widget* widget = new views::Widget; 84 views::Widget* widget = new views::Widget;
85 views::Widget::InitParams params( 85 views::Widget::InitParams params(
86 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 86 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
87 gfx::Size ps = lock_view->GetPreferredSize(); 87 gfx::Size ps = lock_view->GetPreferredSize();
88 88
89 gfx::Size root_window_size = Shell::GetRootWindow()->bounds().size(); 89 gfx::Size root_window_size = Shell::GetPrimaryRootWindow()->bounds().size();
90 params.bounds = gfx::Rect((root_window_size.width() - ps.width()) / 2, 90 params.bounds = gfx::Rect((root_window_size.width() - ps.width()) / 2,
91 (root_window_size.height() - ps.height()) / 2, 91 (root_window_size.height() - ps.height()) / 2,
92 ps.width(), ps.height()); 92 ps.width(), ps.height());
93 params.delegate = lock_view; 93 params.delegate = lock_view;
94 params.parent = 94 params.parent =
95 Shell::GetInstance()->GetContainer( 95 Shell::GetInstance()->GetContainer(
96 ash::internal::kShellWindowId_LockScreenContainer); 96 ash::internal::kShellWindowId_LockScreenContainer);
97 widget->Init(params); 97 widget->Init(params);
98 widget->SetContentsView(lock_view); 98 widget->SetContentsView(lock_view);
99 widget->Show(); 99 widget->Show();
100 widget->GetNativeView()->SetName("LockView"); 100 widget->GetNativeView()->SetName("LockView");
101 widget->GetNativeView()->Focus(); 101 widget->GetNativeView()->Focus();
102 102
103 Shell::GetInstance()->tooltip_controller()->UpdateTooltip( 103 Shell::GetInstance()->tooltip_controller()->UpdateTooltip(
104 widget->GetNativeView()); 104 widget->GetNativeView());
105 } 105 }
106 106
107 } // namespace shell 107 } // namespace shell
108 } // namespace ash 108 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/content_client/shell_browser_main_parts.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698