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/examples/examples_window.h" | 5 #include "ui/views/examples/examples_window.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Overridden from WidgetDelegateView: | 95 // Overridden from WidgetDelegateView: |
96 virtual bool CanResize() const OVERRIDE { return true; } | 96 virtual bool CanResize() const OVERRIDE { return true; } |
97 virtual bool CanMaximize() const OVERRIDE { return true; } | 97 virtual bool CanMaximize() const OVERRIDE { return true; } |
98 virtual string16 GetWindowTitle() const OVERRIDE { | 98 virtual string16 GetWindowTitle() const OVERRIDE { |
99 return ASCIIToUTF16("Views Examples"); | 99 return ASCIIToUTF16("Views Examples"); |
100 } | 100 } |
101 virtual View* GetContentsView() OVERRIDE { return this; } | 101 virtual View* GetContentsView() OVERRIDE { return this; } |
102 virtual void WindowClosing() OVERRIDE { | 102 virtual void WindowClosing() OVERRIDE { |
103 instance_ = NULL; | 103 instance_ = NULL; |
104 if (operation_ == QUIT_ON_CLOSE) | 104 if (operation_ == QUIT_ON_CLOSE) |
105 MessageLoopForUI::current()->Quit(); | 105 base::MessageLoopForUI::current()->Quit(); |
106 } | 106 } |
107 | 107 |
108 // Overridden from View: | 108 // Overridden from View: |
109 virtual void ViewHierarchyChanged(bool is_add, | 109 virtual void ViewHierarchyChanged(bool is_add, |
110 View* parent, | 110 View* parent, |
111 View* child) OVERRIDE { | 111 View* child) OVERRIDE { |
112 if (is_add && child == this) | 112 if (is_add && child == this) |
113 InitExamplesWindow(); | 113 InitExamplesWindow(); |
114 } | 114 } |
115 | 115 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 gfx::Rect(0, 0, 850, 300))->Show(); | 201 gfx::Rect(0, 0, 850, 300))->Show(); |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 void LogStatus(const std::string& string) { | 205 void LogStatus(const std::string& string) { |
206 ExamplesWindowContents::instance()->SetStatus(string); | 206 ExamplesWindowContents::instance()->SetStatus(string); |
207 } | 207 } |
208 | 208 |
209 } // namespace examples | 209 } // namespace examples |
210 } // namespace views | 210 } // namespace views |
OLD | NEW |