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

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

Issue 1887263002: Revert of mash: Close system tray bubble on click outside its bounds, part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/widget/widget.h" 5 #include "ui/views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 if (!native_widget_->HasCapture()) { 926 if (!native_widget_->HasCapture()) {
927 native_widget_->SetCapture(); 927 native_widget_->SetCapture();
928 928
929 // Early return if setting capture was unsuccessful. 929 // Early return if setting capture was unsuccessful.
930 if (!native_widget_->HasCapture()) 930 if (!native_widget_->HasCapture())
931 return; 931 return;
932 } 932 }
933 933
934 if (internal::NativeWidgetPrivate::IsMouseButtonDown()) 934 if (internal::NativeWidgetPrivate::IsMouseButtonDown())
935 is_mouse_button_pressed_ = true; 935 is_mouse_button_pressed_ = true;
936 root_view_->SetMouseHandler(view, auto_release_capture_); 936 root_view_->SetMouseHandler(view);
937 } 937 }
938 938
939 void Widget::ReleaseCapture() { 939 void Widget::ReleaseCapture() {
940 if (native_widget_->HasCapture()) 940 if (native_widget_->HasCapture())
941 native_widget_->ReleaseCapture(); 941 native_widget_->ReleaseCapture();
942 } 942 }
943 943
944 bool Widget::HasCapture() { 944 bool Widget::HasCapture() {
945 return native_widget_->HasCapture(); 945 return native_widget_->HasCapture();
946 } 946 }
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 1468
1469 //////////////////////////////////////////////////////////////////////////////// 1469 ////////////////////////////////////////////////////////////////////////////////
1470 // internal::NativeWidgetPrivate, NativeWidget implementation: 1470 // internal::NativeWidgetPrivate, NativeWidget implementation:
1471 1471
1472 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1472 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1473 return this; 1473 return this;
1474 } 1474 }
1475 1475
1476 } // namespace internal 1476 } // namespace internal
1477 } // namespace views 1477 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698