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

Side by Side Diff: ash/system/status_area_widget.cc

Issue 10546024: Add RootWindowController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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.cc ('k') | ash/tooltips/tooltip_controller.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/system/status_area_widget.h" 5 #include "ash/system/status_area_widget.h"
6 6
7 #include "ash/root_window_controller.h"
7 #include "ash/shell.h" 8 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
9 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 11 #include "ash/system/bluetooth/bluetooth_observer.h"
11 #include "ash/system/network/network_observer.h" 12 #include "ash/system/network/network_observer.h"
12 #include "ash/system/status_area_widget_delegate.h" 13 #include "ash/system/status_area_widget_delegate.h"
13 #include "ash/system/tray/system_tray.h" 14 #include "ash/system/tray/system_tray.h"
14 #include "ash/system/tray/system_tray_delegate.h" 15 #include "ash/system/tray/system_tray_delegate.h"
15 #include "base/i18n/time_formatting.h" 16 #include "base/i18n/time_formatting.h"
16 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } // namespace 279 } // namespace
279 280
280 namespace internal { 281 namespace internal {
281 282
282 StatusAreaWidget::StatusAreaWidget() 283 StatusAreaWidget::StatusAreaWidget()
283 : widget_delegate_(new internal::StatusAreaWidgetDelegate), 284 : widget_delegate_(new internal::StatusAreaWidgetDelegate),
284 system_tray_(NULL) { 285 system_tray_(NULL) {
285 views::Widget::InitParams params( 286 views::Widget::InitParams params(
286 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 287 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
287 params.delegate = widget_delegate_; 288 params.delegate = widget_delegate_;
288 params.parent = Shell::GetContainer( 289 params.parent =
289 Shell::GetPrimaryRootWindow(), 290 Shell::GetPrimaryRootWindowController()->GetContainer(
290 ash::internal::kShellWindowId_StatusContainer); 291 ash::internal::kShellWindowId_StatusContainer);
291 params.transparent = true; 292 params.transparent = true;
292 Init(params); 293 Init(params);
293 set_focus_on_creation(false); 294 set_focus_on_creation(false);
294 SetContentsView(widget_delegate_); 295 SetContentsView(widget_delegate_);
295 GetNativeView()->SetName("StatusAreaWidget"); 296 GetNativeView()->SetName("StatusAreaWidget");
296 } 297 }
297 298
298 StatusAreaWidget::~StatusAreaWidget() { 299 StatusAreaWidget::~StatusAreaWidget() {
299 } 300 }
300 301
(...skipping 25 matching lines...) Expand all
326 system_tray->CreateItems(); // Called after delegate is created. 327 system_tray->CreateItems(); // Called after delegate is created.
327 } 328 }
328 329
329 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) { 330 void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
330 widget_delegate_->set_alignment(alignment); 331 widget_delegate_->set_alignment(alignment);
331 widget_delegate_->UpdateLayout(); 332 widget_delegate_->UpdateLayout();
332 } 333 }
333 334
334 } // namespace internal 335 } // namespace internal
335 } // namespace ash 336 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/tooltips/tooltip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698