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

Side by Side Diff: views/controls/menu/menu_host_win.cc

Issue 6756043: Consolidate Widget Event code, other cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 9 years, 8 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 | « views/controls/menu/menu_host_win.h ('k') | views/events/event.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/menu/menu_host_win.h" 5 #include "views/controls/menu/menu_host_win.h"
6 6
7 #include "base/win/windows_version.h" 7 #include "base/win/windows_version.h"
8 #include "views/controls/menu/menu_controller.h" 8 #include "views/controls/menu/menu_controller.h"
9 #include "views/controls/menu/menu_host_root_view.h" 9 #include "views/controls/menu/menu_host_root_view.h"
10 #include "views/controls/menu/menu_item_view.h" 10 #include "views/controls/menu/menu_item_view.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void MenuHostWin::OnCancelMode() { 101 void MenuHostWin::OnCancelMode() {
102 submenu_->GetMenuItem()->GetMenuController()->Cancel( 102 submenu_->GetMenuItem()->GetMenuController()->Cancel(
103 MenuController::EXIT_ALL); 103 MenuController::EXIT_ALL);
104 } 104 }
105 105
106 RootView* MenuHostWin::CreateRootView() { 106 RootView* MenuHostWin::CreateRootView() {
107 return new MenuHostRootView(this, submenu_); 107 return new MenuHostRootView(this, submenu_);
108 } 108 }
109 109
110 bool MenuHostWin::ReleaseCaptureOnMouseReleased() { 110 bool MenuHostWin::ShouldReleaseCaptureOnMouseReleased() const {
111 return false; 111 return false;
112 } 112 }
113 113
114 //////////////////////////////////////////////////////////////////////////////// 114 ////////////////////////////////////////////////////////////////////////////////
115 // MenuHostWin, private: 115 // MenuHostWin, private:
116 116
117 void MenuHostWin::DoCapture() { 117 void MenuHostWin::DoCapture() {
118 owns_capture_ = true; 118 owns_capture_ = true;
119 SetNativeCapture(); 119 SetMouseCapture();
120 } 120 }
121 121
122 //////////////////////////////////////////////////////////////////////////////// 122 ////////////////////////////////////////////////////////////////////////////////
123 // NativeMenuHost, public: 123 // NativeMenuHost, public:
124 124
125 // static 125 // static
126 NativeMenuHost* NativeMenuHost::CreateNativeMenuHost(SubmenuView* submenu) { 126 NativeMenuHost* NativeMenuHost::CreateNativeMenuHost(SubmenuView* submenu) {
127 return new MenuHostWin(submenu); 127 return new MenuHostWin(submenu);
128 } 128 }
129 129
130 } // namespace views 130 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_host_win.h ('k') | views/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698