| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 // A view that implements GetMinimumSize. | 120 // A view that implements GetMinimumSize. |
| 121 class MinimumSizeFrameView : public NativeFrameView { | 121 class MinimumSizeFrameView : public NativeFrameView { |
| 122 public: | 122 public: |
| 123 explicit MinimumSizeFrameView(Widget* frame): NativeFrameView(frame) {} | 123 explicit MinimumSizeFrameView(Widget* frame): NativeFrameView(frame) {} |
| 124 virtual ~MinimumSizeFrameView() {} | 124 virtual ~MinimumSizeFrameView() {} |
| 125 | 125 |
| 126 private: | 126 private: |
| 127 // Overridden from View: | 127 // Overridden from View: |
| 128 virtual gfx::Size GetMinimumSize() OVERRIDE { | 128 virtual gfx::Size GetMinimumSize() const OVERRIDE { |
| 129 return gfx::Size(300, 400); | 129 return gfx::Size(300, 400); |
| 130 } | 130 } |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(MinimumSizeFrameView); | 132 DISALLOW_COPY_AND_ASSIGN(MinimumSizeFrameView); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 // An event handler that simply keeps a count of the different types of events | 135 // An event handler that simply keeps a count of the different types of events |
| 136 // it receives. | 136 // it receives. |
| 137 class EventCountHandler : public ui::EventHandler { | 137 class EventCountHandler : public ui::EventHandler { |
| 138 public: | 138 public: |
| (...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2463 child_widget.Init(child_params); | 2463 child_widget.Init(child_params); |
| 2464 child_widget.AddObserver(&observer); | 2464 child_widget.AddObserver(&observer); |
| 2465 child_widget.Show(); | 2465 child_widget.Show(); |
| 2466 | 2466 |
| 2467 parent_widget.CloseNow(); | 2467 parent_widget.CloseNow(); |
| 2468 } | 2468 } |
| 2469 #endif | 2469 #endif |
| 2470 | 2470 |
| 2471 } // namespace test | 2471 } // namespace test |
| 2472 } // namespace views | 2472 } // namespace views |
| OLD | NEW |