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

Side by Side Diff: chrome/browser/ui/ash/system_tray_client.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ash/system_tray_client.h" 5 #include "chrome/browser/ui/ash/system_tray_client.h"
6 6
7 #include "ash/common/login_status.h" 7 #include "ash/common/login_status.h"
8 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/public/interfaces/constants.mojom.h" 10 #include "ash/public/interfaces/constants.mojom.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // static 174 // static
175 Widget* SystemTrayClient::CreateUnownedDialogWidget( 175 Widget* SystemTrayClient::CreateUnownedDialogWidget(
176 views::WidgetDelegate* widget_delegate) { 176 views::WidgetDelegate* widget_delegate) {
177 DCHECK(widget_delegate); 177 DCHECK(widget_delegate);
178 Widget::InitParams params = views::DialogDelegate::GetDialogWidgetInitParams( 178 Widget::InitParams params = views::DialogDelegate::GetDialogWidgetInitParams(
179 widget_delegate, nullptr, nullptr, gfx::Rect()); 179 widget_delegate, nullptr, nullptr, gfx::Rect());
180 // Place the dialog in the appropriate modal dialog container, either above 180 // Place the dialog in the appropriate modal dialog container, either above
181 // or below the lock screen, based on the login state. 181 // or below the lock screen, based on the login state.
182 int container_id = GetDialogParentContainerId(); 182 int container_id = GetDialogParentContainerId();
183 if (ash_util::IsRunningInMash()) { 183 if (IsRunningInMash()) {
184 using ui::mojom::WindowManager; 184 using ui::mojom::WindowManager;
185 params.mus_properties[WindowManager::kContainerId_InitProperty] = 185 params.mus_properties[WindowManager::kContainerId_InitProperty] =
186 mojo::ConvertTo<std::vector<uint8_t>>(container_id); 186 mojo::ConvertTo<std::vector<uint8_t>>(container_id);
187 } else { 187 } else {
188 params.parent = ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), 188 params.parent = ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),
189 container_id); 189 container_id);
190 } 190 }
191 Widget* widget = new Widget; // Owned by native widget. 191 Widget* widget = new Widget; // Owned by native widget.
192 widget->Init(params); 192 widget->Init(params);
193 return widget; 193 return widget;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 chromeos::system::SystemClock* clock) { 374 chromeos::system::SystemClock* clock) {
375 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock()); 375 system_tray_->SetUse24HourClock(clock->ShouldUse24HourClock());
376 } 376 }
377 377
378 void SystemTrayClient::Observe(int type, 378 void SystemTrayClient::Observe(int type,
379 const content::NotificationSource& source, 379 const content::NotificationSource& source,
380 const content::NotificationDetails& details) { 380 const content::NotificationDetails& details) {
381 DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type); 381 DCHECK_EQ(chrome::NOTIFICATION_UPGRADE_RECOMMENDED, type);
382 HandleUpdateAvailable(); 382 HandleUpdateAvailable();
383 } 383 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698