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

Side by Side Diff: ash/wm/system_gesture_event_filter_unittest.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Add TODO. Created 6 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
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 "ash/wm/system_gesture_event_filter.h" 5 #include "ash/wm/system_gesture_event_filter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 namespace { 45 namespace {
46 46
47 class ResizableWidgetDelegate : public views::WidgetDelegateView { 47 class ResizableWidgetDelegate : public views::WidgetDelegateView {
48 public: 48 public:
49 ResizableWidgetDelegate() {} 49 ResizableWidgetDelegate() {}
50 virtual ~ResizableWidgetDelegate() {} 50 virtual ~ResizableWidgetDelegate() {}
51 51
52 private: 52 private:
53 virtual bool CanResize() const OVERRIDE { return true; } 53 virtual bool CanResize() const OVERRIDE { return true; }
54 virtual bool CanMaximize() const OVERRIDE { return true; } 54 virtual bool CanMaximize() const OVERRIDE { return true; }
55 virtual bool CanMinimize() const OVERRIDE { return true; }
55 virtual void DeleteDelegate() OVERRIDE { delete this; } 56 virtual void DeleteDelegate() OVERRIDE { delete this; }
56 57
57 DISALLOW_COPY_AND_ASSIGN(ResizableWidgetDelegate); 58 DISALLOW_COPY_AND_ASSIGN(ResizableWidgetDelegate);
58 }; 59 };
59 60
60 // Support class for testing windows with a maximum size. 61 // Support class for testing windows with a maximum size.
61 class MaxSizeNCFV : public views::NonClientFrameView { 62 class MaxSizeNCFV : public views::NonClientFrameView {
62 public: 63 public:
63 MaxSizeNCFV() {} 64 MaxSizeNCFV() {}
64 private: 65 private:
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 for (int i = 1; i <= 3; ++i) 596 for (int i = 1; i <= 3; ++i)
596 GetEventGenerator().ReleaseTouchId(i); 597 GetEventGenerator().ReleaseTouchId(i);
597 EXPECT_EQ(event_handler.num_gesture_events(), 598 EXPECT_EQ(event_handler.num_gesture_events(),
598 delegate.GetGestureCountAndReset()); 599 delegate.GetGestureCountAndReset());
599 600
600 aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler); 601 aura::Env::GetInstance()->RemovePreTargetHandler(&event_handler);
601 } 602 }
602 603
603 } // namespace test 604 } // namespace test
604 } // namespace ash 605 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/resize_shadow_and_cursor_unittest.cc ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698