Index: views/controls/menu/menu_host_win.cc |
=================================================================== |
--- views/controls/menu/menu_host_win.cc (revision 29776) |
+++ views/controls/menu/menu_host_win.cc (working copy) |
@@ -37,14 +37,8 @@ |
WidgetWin::Init(parent, bounds); |
SetContentsView(contents_view); |
Show(); |
- owns_capture_ = do_capture; |
- if (do_capture) { |
- SetCapture(); |
- has_capture_ = true; |
-#ifdef DEBUG_MENU |
- DLOG(INFO) << "Doing capture"; |
-#endif |
- } |
+ if (do_capture) |
+ DoCapture(); |
} |
void MenuHost::Show() { |
@@ -82,6 +76,15 @@ |
#endif |
} |
+void MenuHost::DoCapture() { |
+ owns_capture_ = true; |
+ SetCapture(); |
+ has_capture_ = true; |
+#ifdef DEBUG_MENU |
+ DLOG(INFO) << "Doing capture"; |
+#endif |
+} |
+ |
void MenuHost::ReleaseCapture() { |
if (owns_capture_) { |
#ifdef DEBUG_MENU |