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/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 } else if (sender == window_modal_button_) { | 334 } else if (sender == window_modal_button_) { |
335 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), | 335 ModalWindow::OpenModalWindow(GetWidget()->GetNativeView(), |
336 ui::MODAL_TYPE_WINDOW); | 336 ui::MODAL_TYPE_WINDOW); |
337 } else if (sender == transient_button_) { | 337 } else if (sender == transient_button_) { |
338 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); | 338 NonModalTransient::OpenNonModalTransient(GetWidget()->GetNativeView()); |
339 } else if (sender == show_hide_window_button_) { | 339 } else if (sender == show_hide_window_button_) { |
340 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); | 340 NonModalTransient::ToggleNonModalTransient(GetWidget()->GetNativeView()); |
341 } | 341 } |
342 #if !defined(OS_MACOSX) | 342 #if !defined(OS_MACOSX) |
343 else if (sender == examples_button_) { | 343 else if (sender == examples_button_) { |
344 views::examples::ShowExamplesWindow(views::examples::DO_NOTHING_ON_CLOSE, | 344 views::examples::ShowExamplesWindow( |
345 NULL); | 345 views::examples::DO_NOTHING_ON_CLOSE, |
| 346 ash::Shell::GetInstance()->browser_context()); |
346 } | 347 } |
347 #endif // !defined(OS_MACOSX) | 348 #endif // !defined(OS_MACOSX) |
348 } | 349 } |
349 | 350 |
350 #if !defined(OS_MACOSX) | 351 #if !defined(OS_MACOSX) |
351 void WindowTypeLauncher::ExecuteCommand(int id) { | 352 void WindowTypeLauncher::ExecuteCommand(int id) { |
352 switch (id) { | 353 switch (id) { |
353 case COMMAND_NEW_WINDOW: | 354 case COMMAND_NEW_WINDOW: |
354 InitWindowTypeLauncher(); | 355 InitWindowTypeLauncher(); |
355 break; | 356 break; |
(...skipping 20 matching lines...) Expand all Loading... |
376 menu_runner_.reset(new MenuRunner(root)); | 377 menu_runner_.reset(new MenuRunner(root)); |
377 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 378 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
378 MenuItemView::TOPLEFT, | 379 MenuItemView::TOPLEFT, |
379 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) | 380 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) |
380 return; | 381 return; |
381 } | 382 } |
382 #endif // !defined(OS_MACOSX) | 383 #endif // !defined(OS_MACOSX) |
383 | 384 |
384 } // namespace shell | 385 } // namespace shell |
385 } // namespace ash | 386 } // namespace ash |
OLD | NEW |