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