summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/menu_host_win.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 03:47:37 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 03:47:37 +0000
commit9d56dd31573039d45135ec516260bcc070cc284f (patch)
treef1df57876f1d1fc9998dda7d35adc98764a34b94 /views/controls/menu/menu_host_win.cc
parente49002ab6fab8693dda975ee8bd0ffaae8bbc5cb (diff)
downloadchromium_src-9d56dd31573039d45135ec516260bcc070cc284f.zip
chromium_src-9d56dd31573039d45135ec516260bcc070cc284f.tar.gz
chromium_src-9d56dd31573039d45135ec516260bcc070cc284f.tar.bz2
Attempt 2 at:
Gets mouse capture to work for menus with pure views. As part of this I moved what was in menu_host_gtk into native_widget_gtk. Gtk supports two grab types, both mouse and key. We only want key grab when showing menus. BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7354006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/menu_host_win.cc')
-rw-r--r--views/controls/menu/menu_host_win.cc61
1 files changed, 0 insertions, 61 deletions
diff --git a/views/controls/menu/menu_host_win.cc b/views/controls/menu/menu_host_win.cc
deleted file mode 100644
index 2190b29..0000000
--- a/views/controls/menu/menu_host_win.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2011 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.
-
-#include "views/controls/menu/menu_host_win.h"
-
-#include "views/controls/menu/menu_host_views.h"
-#include "views/controls/menu/native_menu_host_delegate.h"
-#include "views/views_delegate.h"
-
-namespace views {
-
-////////////////////////////////////////////////////////////////////////////////
-// MenuHostWin, public:
-
-MenuHostWin::MenuHostWin(internal::NativeMenuHostDelegate* delegate)
- : NativeWidgetWin(delegate->AsNativeWidgetDelegate()),
- delegate_(delegate) {
-}
-
-MenuHostWin::~MenuHostWin() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MenuHostWin, NativeMenuHost implementation:
-
-void MenuHostWin::StartCapturing() {
- SetMouseCapture();
-}
-
-NativeWidget* MenuHostWin::AsNativeWidget() {
- return this;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MenuHostWin, NativeWidgetWin overrides:
-
-void MenuHostWin::OnDestroy() {
- delegate_->OnNativeMenuHostDestroy();
- NativeWidgetWin::OnDestroy();
-}
-
-void MenuHostWin::OnCancelMode() {
- delegate_->OnNativeMenuHostCancelCapture();
- NativeWidgetWin::OnCancelMode();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// NativeMenuHost, public:
-
-// static
-NativeMenuHost* NativeMenuHost::CreateNativeMenuHost(
- internal::NativeMenuHostDelegate* delegate) {
- if (Widget::IsPureViews() &&
- ViewsDelegate::views_delegate->GetDefaultParentView()) {
- return new MenuHostViews(delegate);
- }
- return new MenuHostWin(delegate);
-}
-
-} // namespace views