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

Side by Side Diff: chrome/browser/chromeos/views/native_menu_domui.cc

Issue 6155011: Implementing context menu for the new views textfield. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: resolved small merge conflict Created 9 years, 11 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 | « app/resources/app_strings.grd ('k') | views/controls/menu/native_menu_gtk.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/views/native_menu_domui.h" 5 #include "chrome/browser/chromeos/views/native_menu_domui.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 NativeMenuDOMUI* found = submenu_->FindMenuAt(point); 393 NativeMenuDOMUI* found = submenu_->FindMenuAt(point);
394 if (found) 394 if (found)
395 return found; 395 return found;
396 } 396 }
397 gfx::Rect bounds; 397 gfx::Rect bounds;
398 menu_widget_->GetBounds(&bounds, false); 398 menu_widget_->GetBounds(&bounds, false);
399 return bounds.Contains(point) ? this : NULL; 399 return bounds.Contains(point) ? this : NULL;
400 } 400 }
401 401
402 } // namespace chromeos 402 } // namespace chromeos
403
404 ////////////////////////////////////////////////////////////////////////////////
405 // MenuWrapper, public:
406
407 namespace views {
408
409 // static
410 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) {
411 ui::MenuModel* model = menu->model();
412 if (chromeos::MenuUI::IsEnabled()) {
413 return new chromeos::NativeMenuDOMUI(model, true);
414 } else {
415 #if defined(TOUCH_UI)
416 return new NativeMenuX(menu);
417 #else
418 return new NativeMenuGtk(menu);
419 #endif
420 }
421 }
422
423 } // namespace views
OLDNEW
« no previous file with comments | « app/resources/app_strings.grd ('k') | views/controls/menu/native_menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698