Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: ash/shell/window_type_launcher.cc

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698