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

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

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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/touchui/touch_editing_menu.cc ('k') | ui/views/window/custom_frame_view.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/views/test/widget_test.h" 9 #include "ui/views/test/widget_test.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 MouseEventTrackingWidget() : got_mouse_event_(false) {} 673 MouseEventTrackingWidget() : got_mouse_event_(false) {}
674 virtual ~MouseEventTrackingWidget() {} 674 virtual ~MouseEventTrackingWidget() {}
675 675
676 bool GetAndClearGotMouseEvent() { 676 bool GetAndClearGotMouseEvent() {
677 bool value = got_mouse_event_; 677 bool value = got_mouse_event_;
678 got_mouse_event_ = false; 678 got_mouse_event_ = false;
679 return value; 679 return value;
680 } 680 }
681 681
682 // Widget: 682 // Widget:
683 virtual void OnMouseEvent(ui::MouseEvent* event) { 683 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE {
684 got_mouse_event_ = true; 684 got_mouse_event_ = true;
685 Widget::OnMouseEvent(event); 685 Widget::OnMouseEvent(event);
686 } 686 }
687 687
688 private: 688 private:
689 bool got_mouse_event_; 689 bool got_mouse_event_;
690 690
691 DISALLOW_COPY_AND_ASSIGN(MouseEventTrackingWidget); 691 DISALLOW_COPY_AND_ASSIGN(MouseEventTrackingWidget);
692 }; 692 };
693 693
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 static_cast<aura::RootWindowHostDelegate*>( 726 static_cast<aura::RootWindowHostDelegate*>(
727 widget1.GetNativeWindow()->GetRootWindow())->OnHostMouseEvent( 727 widget1.GetNativeWindow()->GetRootWindow())->OnHostMouseEvent(
728 &mouse_event); 728 &mouse_event);
729 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent()); 729 EXPECT_TRUE(widget1.GetAndClearGotMouseEvent());
730 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent()); 730 EXPECT_FALSE(widget2.GetAndClearGotMouseEvent());
731 } 731 }
732 #endif 732 #endif
733 733
734 } // namespace test 734 } // namespace test
735 } // namespace views 735 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/touchui/touch_editing_menu.cc ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698