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/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 ui::MenuSourceType source_type) { | 380 ui::MenuSourceType source_type) { |
381 MenuItemView* root = new MenuItemView(this); | 381 MenuItemView* root = new MenuItemView(this); |
382 root->AppendMenuItem(COMMAND_NEW_WINDOW, | 382 root->AppendMenuItem(COMMAND_NEW_WINDOW, |
383 base::ASCIIToUTF16("New Window"), | 383 base::ASCIIToUTF16("New Window"), |
384 MenuItemView::NORMAL); | 384 MenuItemView::NORMAL); |
385 root->AppendMenuItem(COMMAND_TOGGLE_FULLSCREEN, | 385 root->AppendMenuItem(COMMAND_TOGGLE_FULLSCREEN, |
386 base::ASCIIToUTF16("Toggle FullScreen"), | 386 base::ASCIIToUTF16("Toggle FullScreen"), |
387 MenuItemView::NORMAL); | 387 MenuItemView::NORMAL); |
388 // MenuRunner takes ownership of root. | 388 // MenuRunner takes ownership of root. |
389 menu_runner_.reset(new MenuRunner(root)); | 389 menu_runner_.reset(new MenuRunner(root)); |
390 if (menu_runner_->RunMenuAt(GetWidget(), NULL, | 390 if (menu_runner_->RunMenuAt( |
391 gfx::Rect(point, gfx::Size()), | 391 GetWidget(), |
392 MenuItemView::TOPLEFT, | 392 NULL, |
393 source_type, | 393 gfx::Rect(point, gfx::Size()), |
394 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == | 394 views::MENU_ANCHOR_TOPLEFT, |
395 MenuRunner::MENU_DELETED) | 395 source_type, |
| 396 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == |
| 397 MenuRunner::MENU_DELETED) { |
396 return; | 398 return; |
| 399 } |
397 } | 400 } |
398 | 401 |
399 } // namespace shell | 402 } // namespace shell |
400 } // namespace ash | 403 } // namespace ash |
OLD | NEW |