summaryrefslogtreecommitdiffstats
path: root/views/controls/native_control.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/native_control.cc')
-rw-r--r--views/controls/native_control.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/views/controls/native_control.cc b/views/controls/native_control.cc
index 961066d..f6b1d75 100644
--- a/views/controls/native_control.cc
+++ b/views/controls/native_control.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -260,16 +260,10 @@ void NativeControl::OnContextMenu(const POINT& location) {
if (!GetContextMenuController())
return;
- int x = location.x;
- int y = location.y;
- bool is_mouse = true;
- if (x == -1 && y == -1) {
- gfx::Point point = GetKeyboardContextMenuLocation();
- x = point.x();
- y = point.y();
- is_mouse = false;
- }
- ShowContextMenu(x, y, is_mouse);
+ if (location.x == -1 && location.y == -1)
+ ShowContextMenu(GetKeyboardContextMenuLocation(), false);
+ else
+ ShowContextMenu(gfx::Point(location), true);
}
void NativeControl::Focus() {