OLD | NEW |
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/native_widget_aura.h" | 5 #include "ui/views/widget/native_widget_aura.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 class PropertyTestWidgetDelegate : public views::WidgetDelegate { | 205 class PropertyTestWidgetDelegate : public views::WidgetDelegate { |
206 public: | 206 public: |
207 explicit PropertyTestWidgetDelegate(Widget* widget) : widget_(widget) {} | 207 explicit PropertyTestWidgetDelegate(Widget* widget) : widget_(widget) {} |
208 virtual ~PropertyTestWidgetDelegate() {} | 208 virtual ~PropertyTestWidgetDelegate() {} |
209 | 209 |
210 private: | 210 private: |
211 // views::WidgetDelegate: | 211 // views::WidgetDelegate: |
212 virtual bool CanMaximize() const OVERRIDE { | 212 virtual bool CanMaximize() const OVERRIDE { |
213 return true; | 213 return true; |
214 } | 214 } |
| 215 virtual bool CanMinimize() const OVERRIDE { |
| 216 return true; |
| 217 } |
215 virtual bool CanResize() const OVERRIDE { | 218 virtual bool CanResize() const OVERRIDE { |
216 return true; | 219 return true; |
217 } | 220 } |
218 virtual void DeleteDelegate() OVERRIDE { | 221 virtual void DeleteDelegate() OVERRIDE { |
219 delete this; | 222 delete this; |
220 } | 223 } |
221 virtual Widget* GetWidget() OVERRIDE { | 224 virtual Widget* GetWidget() OVERRIDE { |
222 return widget_; | 225 return widget_; |
223 } | 226 } |
224 virtual const Widget* GetWidget() const OVERRIDE { | 227 virtual const Widget* GetWidget() const OVERRIDE { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 delegate->ClearGotMove(); | 476 delegate->ClearGotMove(); |
474 // Simulate a maximize with animation. | 477 // Simulate a maximize with animation. |
475 delete widget->GetNativeView()->RecreateLayer().release(); | 478 delete widget->GetNativeView()->RecreateLayer().release(); |
476 widget->SetBounds(gfx::Rect(0, 0, 500, 500)); | 479 widget->SetBounds(gfx::Rect(0, 0, 500, 500)); |
477 EXPECT_TRUE(delegate->got_move()); | 480 EXPECT_TRUE(delegate->got_move()); |
478 widget->CloseNow(); | 481 widget->CloseNow(); |
479 } | 482 } |
480 | 483 |
481 } // namespace | 484 } // namespace |
482 } // namespace views | 485 } // namespace views |
OLD | NEW |