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

Side by Side Diff: views/widget/root_view.cc

Issue 8384020: Close new bubbles on deactivate; disable rendering Chrome inactive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the WS_POPUP style for non-modal dialogs. Created 9 years, 1 month 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/widget/native_widget_win.cc ('k') | no next file » | 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/widget/root_view.h" 5 #include "views/widget/root_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 hit_disabled_view = true; 193 hit_disabled_view = true;
194 break; 194 break;
195 } 195 }
196 196
197 // See if this view wants to handle the mouse press. 197 // See if this view wants to handle the mouse press.
198 MouseEvent mouse_pressed_event(e, this, mouse_pressed_handler_); 198 MouseEvent mouse_pressed_event(e, this, mouse_pressed_handler_);
199 199
200 // Remove the double-click flag if the handler is different than the 200 // Remove the double-click flag if the handler is different than the
201 // one which got the first click part of the double-click. 201 // one which got the first click part of the double-click.
202 if (mouse_pressed_handler_ != last_click_handler_) 202 if (mouse_pressed_handler_ != last_click_handler_)
203 mouse_pressed_event.set_flags(e.flags() & 203 mouse_pressed_event.set_flags(e.flags() & ~ui::EF_IS_DOUBLE_CLICK);
204 ~ui::EF_IS_DOUBLE_CLICK);
205 204
206 drag_info.Reset(); 205 drag_info.Reset();
207 bool handled = mouse_pressed_handler_->ProcessMousePressed( 206 bool handled = mouse_pressed_handler_->ProcessMousePressed(
208 mouse_pressed_event, &drag_info); 207 mouse_pressed_event, &drag_info);
209 208
210 // The view could have removed itself from the tree when handling 209 // The view could have removed itself from the tree when handling
211 // OnMousePressed(). In this case, the removal notification will have 210 // OnMousePressed(). In this case, the removal notification will have
212 // reset mouse_pressed_handler_ to NULL out from under us. Detect this 211 // reset mouse_pressed_handler_ to NULL out from under us. Detect this
213 // case and stop. (See comments in view.h.) 212 // case and stop. (See comments in view.h.)
214 // 213 //
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 446 }
448 447
449 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) { 448 void RootView::SetMouseLocationAndFlags(const MouseEvent& event) {
450 last_mouse_event_flags_ = event.flags(); 449 last_mouse_event_flags_ = event.flags();
451 last_mouse_event_x_ = event.x(); 450 last_mouse_event_x_ = event.x();
452 last_mouse_event_y_ = event.y(); 451 last_mouse_event_y_ = event.y();
453 } 452 }
454 453
455 } // namespace internal 454 } // namespace internal
456 } // namespace views 455 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698