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

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

Issue 9665008: views: Nuke is_mouse_gesture parameter from ContextMenuController::ShowContextMenuForView(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nuke is_mouse_gesture parameter Created 8 years, 9 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/shell/window_type_launcher.h ('k') | chrome/browser/chromeos/frame/browser_view.h » ('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/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "ash/shell/example_factory.h" 8 #include "ash/shell/example_factory.h"
9 #include "ash/shell/panel_window.h" 9 #include "ash/shell/panel_window.h"
10 #include "ash/shell/toplevel_window.h" 10 #include "ash/shell/toplevel_window.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 GetWidget()->SetFullscreen(!GetWidget()->IsFullscreen()); 349 GetWidget()->SetFullscreen(!GetWidget()->IsFullscreen());
350 break; 350 break;
351 default: 351 default:
352 break; 352 break;
353 } 353 }
354 } 354 }
355 #endif // !defined(OS_MACOSX) 355 #endif // !defined(OS_MACOSX)
356 356
357 #if !defined(OS_MACOSX) 357 #if !defined(OS_MACOSX)
358 void WindowTypeLauncher::ShowContextMenuForView(views::View* source, 358 void WindowTypeLauncher::ShowContextMenuForView(views::View* source,
359 const gfx::Point& p, 359 const gfx::Point& point) {
360 bool is_mouse_gesture) {
361 MenuItemView* root = new MenuItemView(this); 360 MenuItemView* root = new MenuItemView(this);
362 root->AppendMenuItem(COMMAND_NEW_WINDOW, 361 root->AppendMenuItem(COMMAND_NEW_WINDOW,
363 ASCIIToUTF16("New Window"), 362 ASCIIToUTF16("New Window"),
364 MenuItemView::NORMAL); 363 MenuItemView::NORMAL);
365 root->AppendMenuItem(COMMAND_TOGGLE_FULLSCREEN, 364 root->AppendMenuItem(COMMAND_TOGGLE_FULLSCREEN,
366 ASCIIToUTF16("Toggle FullScreen"), 365 ASCIIToUTF16("Toggle FullScreen"),
367 MenuItemView::NORMAL); 366 MenuItemView::NORMAL);
368 // MenuRunner takes ownership of root. 367 // MenuRunner takes ownership of root.
369 menu_runner_.reset(new MenuRunner(root)); 368 menu_runner_.reset(new MenuRunner(root));
370 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size(0, 0)), 369 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()),
371 MenuItemView::TOPLEFT, 370 MenuItemView::TOPLEFT,
372 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) 371 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED)
373 return; 372 return;
374 } 373 }
375 #endif // !defined(OS_MACOSX) 374 #endif // !defined(OS_MACOSX)
376 375
377 } // namespace shell 376 } // namespace shell
378 } // namespace ash 377 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | chrome/browser/chromeos/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698