| OLD | NEW |
| 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> |
| 8 |
| 7 #include "ash/content/shell_content_state.h" | 9 #include "ash/content/shell_content_state.h" |
| 8 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| 9 #include "ash/session/session_state_delegate.h" | 11 #include "ash/session/session_state_delegate.h" |
| 10 #include "ash/shelf/shelf_widget.h" | 12 #include "ash/shelf/shelf_widget.h" |
| 11 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 12 #include "ash/shell/example_factory.h" | 14 #include "ash/shell/example_factory.h" |
| 13 #include "ash/shell/panel_window.h" | 15 #include "ash/shell/panel_window.h" |
| 14 #include "ash/shell/toplevel_window.h" | 16 #include "ash/shell/toplevel_window.h" |
| 15 #include "ash/shell_delegate.h" | 17 #include "ash/shell_delegate.h" |
| 16 #include "ash/shell_window_ids.h" | 18 #include "ash/shell_window_ids.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 scoped_ptr<message_center::Notification> notification; | 315 scoped_ptr<message_center::Notification> notification; |
| 314 notification.reset(new message_center::Notification( | 316 notification.reset(new message_center::Notification( |
| 315 message_center::NOTIFICATION_TYPE_SIMPLE, "id0", | 317 message_center::NOTIFICATION_TYPE_SIMPLE, "id0", |
| 316 base::ASCIIToUTF16("Test Shell Web Notification"), | 318 base::ASCIIToUTF16("Test Shell Web Notification"), |
| 317 base::ASCIIToUTF16("Notification message body."), gfx::Image(), | 319 base::ASCIIToUTF16("Notification message body."), gfx::Image(), |
| 318 base::ASCIIToUTF16("www.testshell.org"), GURL(), | 320 base::ASCIIToUTF16("www.testshell.org"), GURL(), |
| 319 message_center::NotifierId(message_center::NotifierId::APPLICATION, | 321 message_center::NotifierId(message_center::NotifierId::APPLICATION, |
| 320 "test-id"), | 322 "test-id"), |
| 321 message_center::RichNotificationData(), NULL /* delegate */)); | 323 message_center::RichNotificationData(), NULL /* delegate */)); |
| 322 | 324 |
| 323 ash::Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget() | 325 ash::Shell::GetPrimaryRootWindowController() |
| 324 ->web_notification_tray()->message_center() | 326 ->shelf() |
| 325 ->AddNotification(notification.Pass()); | 327 ->status_area_widget() |
| 328 ->web_notification_tray() |
| 329 ->message_center() |
| 330 ->AddNotification(std::move(notification)); |
| 326 } else if (sender == examples_button_) { | 331 } else if (sender == examples_button_) { |
| 327 views::examples::ShowExamplesWindowWithContent( | 332 views::examples::ShowExamplesWindowWithContent( |
| 328 views::examples::DO_NOTHING_ON_CLOSE, | 333 views::examples::DO_NOTHING_ON_CLOSE, |
| 329 ShellContentState::GetInstance()->GetActiveBrowserContext(), NULL); | 334 ShellContentState::GetInstance()->GetActiveBrowserContext(), NULL); |
| 330 } | 335 } |
| 331 } | 336 } |
| 332 | 337 |
| 333 void WindowTypeLauncher::ExecuteCommand(int id, int event_flags) { | 338 void WindowTypeLauncher::ExecuteCommand(int id, int event_flags) { |
| 334 switch (id) { | 339 switch (id) { |
| 335 case COMMAND_NEW_WINDOW: | 340 case COMMAND_NEW_WINDOW: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 361 NULL, | 366 NULL, |
| 362 gfx::Rect(point, gfx::Size()), | 367 gfx::Rect(point, gfx::Size()), |
| 363 views::MENU_ANCHOR_TOPLEFT, | 368 views::MENU_ANCHOR_TOPLEFT, |
| 364 source_type) == MenuRunner::MENU_DELETED) { | 369 source_type) == MenuRunner::MENU_DELETED) { |
| 365 return; | 370 return; |
| 366 } | 371 } |
| 367 } | 372 } |
| 368 | 373 |
| 369 } // namespace shell | 374 } // namespace shell |
| 370 } // namespace ash | 375 } // namespace ash |
| OLD | NEW |