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

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

Issue 2304443002: ash: Move ShelfWidget ownership to WmShelf and refactor access to it (Closed)
Patch Set: review comments Created 4 years, 3 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/test/status_area_widget_test_helper.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/window_type_launcher.h" 5 #include "ash/shell/window_type_launcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shelf/shelf_widget.h"
11 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
12 #include "ash/common/system/status_area_widget.h" 11 #include "ash/common/system/status_area_widget.h"
13 #include "ash/common/system/web_notification/web_notification_tray.h" 12 #include "ash/common/system/web_notification/web_notification_tray.h"
14 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
15 #include "ash/content/shell_content_state.h" 14 #include "ash/content/shell_content_state.h"
16 #include "ash/root_window_controller.h" 15 #include "ash/root_window_controller.h"
17 #include "ash/shell.h" 16 #include "ash/shell.h"
18 #include "ash/shell/example_factory.h" 17 #include "ash/shell/example_factory.h"
19 #include "ash/shell/panel_window.h" 18 #include "ash/shell/panel_window.h"
20 #include "ash/shell/toplevel_window.h" 19 #include "ash/shell/toplevel_window.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 notification.reset(new message_center::Notification( 310 notification.reset(new message_center::Notification(
312 message_center::NOTIFICATION_TYPE_SIMPLE, "id0", 311 message_center::NOTIFICATION_TYPE_SIMPLE, "id0",
313 base::ASCIIToUTF16("Test Shell Web Notification"), 312 base::ASCIIToUTF16("Test Shell Web Notification"),
314 base::ASCIIToUTF16("Notification message body."), gfx::Image(), 313 base::ASCIIToUTF16("Notification message body."), gfx::Image(),
315 base::ASCIIToUTF16("www.testshell.org"), GURL(), 314 base::ASCIIToUTF16("www.testshell.org"), GURL(),
316 message_center::NotifierId(message_center::NotifierId::APPLICATION, 315 message_center::NotifierId(message_center::NotifierId::APPLICATION,
317 "test-id"), 316 "test-id"),
318 message_center::RichNotificationData(), NULL /* delegate */)); 317 message_center::RichNotificationData(), NULL /* delegate */));
319 318
320 Shell::GetPrimaryRootWindowController() 319 Shell::GetPrimaryRootWindowController()
321 ->shelf_widget() 320 ->GetStatusAreaWidget()
322 ->status_area_widget()
323 ->web_notification_tray() 321 ->web_notification_tray()
324 ->message_center() 322 ->message_center()
325 ->AddNotification(std::move(notification)); 323 ->AddNotification(std::move(notification));
326 } else if (sender == examples_button_) { 324 } else if (sender == examples_button_) {
327 views::examples::ShowExamplesWindowWithContent( 325 views::examples::ShowExamplesWindowWithContent(
328 views::examples::DO_NOTHING_ON_CLOSE, 326 views::examples::DO_NOTHING_ON_CLOSE,
329 ShellContentState::GetInstance()->GetActiveBrowserContext(), NULL); 327 ShellContentState::GetInstance()->GetActiveBrowserContext(), NULL);
330 } 328 }
331 } 329 }
332 330
(...skipping 26 matching lines...) Expand all
359 views::MenuRunner::ASYNC)); 357 views::MenuRunner::ASYNC));
360 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), 358 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
361 views::MENU_ANCHOR_TOPLEFT, 359 views::MENU_ANCHOR_TOPLEFT,
362 source_type) == MenuRunner::MENU_DELETED) { 360 source_type) == MenuRunner::MENU_DELETED) {
363 return; 361 return;
364 } 362 }
365 } 363 }
366 364
367 } // namespace shell 365 } // namespace shell
368 } // namespace ash 366 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/test/status_area_widget_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698