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 "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } else if (sender == child_modal_button_) { | 304 } else if (sender == child_modal_button_) { |
305 ash::test::CreateChildModalParent( | 305 ash::test::CreateChildModalParent( |
306 GetWidget()->GetNativeView()->GetRootWindow()); | 306 GetWidget()->GetNativeView()->GetRootWindow()); |
307 } else if (sender == transient_button_) { | 307 } else if (sender == transient_button_) { |
308 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); | 308 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); |
309 } else if (sender == show_hide_window_button_) { | 309 } else if (sender == show_hide_window_button_) { |
310 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); | 310 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); |
311 } else if (sender == show_web_notification_) { | 311 } else if (sender == show_web_notification_) { |
312 scoped_ptr<message_center::Notification> notification; | 312 scoped_ptr<message_center::Notification> notification; |
313 notification.reset(new message_center::Notification( | 313 notification.reset(new message_center::Notification( |
314 message_center::NOTIFICATION_TYPE_SIMPLE, | 314 message_center::NOTIFICATION_TYPE_SIMPLE, "id0", |
315 "id0", | |
316 base::ASCIIToUTF16("Test Shell Web Notification"), | 315 base::ASCIIToUTF16("Test Shell Web Notification"), |
317 base::ASCIIToUTF16("Notification message body."), | 316 base::ASCIIToUTF16("Notification message body."), gfx::Image(), |
318 gfx::Image(), | 317 base::ASCIIToUTF16("www.testshell.org"), GURL(), |
319 base::ASCIIToUTF16("www.testshell.org"), | 318 message_center::NotifierId(message_center::NotifierId::APPLICATION, |
320 message_center::NotifierId( | 319 "test-id"), |
321 message_center::NotifierId::APPLICATION, "test-id"), | 320 message_center::RichNotificationData(), NULL /* delegate */)); |
322 message_center::RichNotificationData(), | |
323 NULL /* delegate */)); | |
324 | 321 |
325 ash::Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget() | 322 ash::Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget() |
326 ->web_notification_tray()->message_center() | 323 ->web_notification_tray()->message_center() |
327 ->AddNotification(notification.Pass()); | 324 ->AddNotification(notification.Pass()); |
328 } else if (sender == examples_button_) { | 325 } else if (sender == examples_button_) { |
329 views::examples::ShowExamplesWindowWithContent( | 326 views::examples::ShowExamplesWindowWithContent( |
330 views::examples::DO_NOTHING_ON_CLOSE, | 327 views::examples::DO_NOTHING_ON_CLOSE, |
331 Shell::GetInstance()->delegate()->GetActiveBrowserContext(), | 328 Shell::GetInstance()->delegate()->GetActiveBrowserContext(), |
332 NULL); | 329 NULL); |
333 } | 330 } |
(...skipping 30 matching lines...) Expand all Loading... |
364 NULL, | 361 NULL, |
365 gfx::Rect(point, gfx::Size()), | 362 gfx::Rect(point, gfx::Size()), |
366 views::MENU_ANCHOR_TOPLEFT, | 363 views::MENU_ANCHOR_TOPLEFT, |
367 source_type) == MenuRunner::MENU_DELETED) { | 364 source_type) == MenuRunner::MENU_DELETED) { |
368 return; | 365 return; |
369 } | 366 } |
370 } | 367 } |
371 | 368 |
372 } // namespace shell | 369 } // namespace shell |
373 } // namespace ash | 370 } // namespace ash |
OLD | NEW |