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/screensaver/screensaver_view.h" | 8 #include "ash/screensaver/screensaver_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); | 322 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); |
323 } else if (sender == show_screensaver_) { | 323 } else if (sender == show_screensaver_) { |
324 ash::ShowScreensaver(GURL("http://www.google.com")); | 324 ash::ShowScreensaver(GURL("http://www.google.com")); |
325 content::BrowserThread::PostDelayedTask(content::BrowserThread::UI, | 325 content::BrowserThread::PostDelayedTask(content::BrowserThread::UI, |
326 FROM_HERE, | 326 FROM_HERE, |
327 base::Bind(&ash::CloseScreensaver), | 327 base::Bind(&ash::CloseScreensaver), |
328 base::TimeDelta::FromSeconds(5)); | 328 base::TimeDelta::FromSeconds(5)); |
329 | 329 |
330 } else if (sender == show_web_notification_) { | 330 } else if (sender == show_web_notification_) { |
331 ash::Shell::GetPrimaryRootWindowController()->status_area_widget()-> | 331 ash::Shell::GetPrimaryRootWindowController()->status_area_widget()-> |
332 web_notification_tray()->AddNotification( | 332 web_notification_tray()->message_center()->AddNotification( |
333 "id0", | 333 "id0", |
334 ASCIIToUTF16("Test Shell Web Notification"), | 334 ASCIIToUTF16("Test Shell Web Notification"), |
335 ASCIIToUTF16("Notification message body."), | 335 ASCIIToUTF16("Notification message body."), |
336 ASCIIToUTF16("www.testshell.org"), | 336 ASCIIToUTF16("www.testshell.org"), |
337 "" /* extension id */); | 337 "" /* extension id */); |
338 } | 338 } |
339 #if !defined(OS_MACOSX) | 339 #if !defined(OS_MACOSX) |
340 else if (sender == examples_button_) { | 340 else if (sender == examples_button_) { |
341 views::examples::ShowExamplesWindowWithContent( | 341 views::examples::ShowExamplesWindowWithContent( |
342 views::examples::DO_NOTHING_ON_CLOSE, | 342 views::examples::DO_NOTHING_ON_CLOSE, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 375 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
376 MenuItemView::TOPLEFT, | 376 MenuItemView::TOPLEFT, |
377 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == | 377 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == |
378 MenuRunner::MENU_DELETED) | 378 MenuRunner::MENU_DELETED) |
379 return; | 379 return; |
380 } | 380 } |
381 #endif // !defined(OS_MACOSX) | 381 #endif // !defined(OS_MACOSX) |
382 | 382 |
383 } // namespace shell | 383 } // namespace shell |
384 } // namespace ash | 384 } // namespace ash |
OLD | NEW |