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_with_content.h" | 5 #include "ui/views/examples/examples_window_with_content.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Overridden from WidgetDelegateView: | 104 // Overridden from WidgetDelegateView: |
105 virtual bool CanResize() const OVERRIDE { return true; } | 105 virtual bool CanResize() const OVERRIDE { return true; } |
106 virtual bool CanMaximize() const OVERRIDE { return true; } | 106 virtual bool CanMaximize() const OVERRIDE { return true; } |
107 virtual string16 GetWindowTitle() const OVERRIDE { | 107 virtual string16 GetWindowTitle() const OVERRIDE { |
108 return ASCIIToUTF16("Views Examples"); | 108 return ASCIIToUTF16("Views Examples"); |
109 } | 109 } |
110 virtual View* GetContentsView() OVERRIDE { return this; } | 110 virtual View* GetContentsView() OVERRIDE { return this; } |
111 virtual void WindowClosing() OVERRIDE { | 111 virtual void WindowClosing() OVERRIDE { |
112 instance_ = NULL; | 112 instance_ = NULL; |
113 if (operation_ == QUIT_ON_CLOSE) | 113 if (operation_ == QUIT_ON_CLOSE) |
114 MessageLoopForUI::current()->Quit(); | 114 base::MessageLoopForUI::current()->Quit(); |
115 } | 115 } |
116 | 116 |
117 // Overridden from View: | 117 // Overridden from View: |
118 virtual void ViewHierarchyChanged(bool is_add, | 118 virtual void ViewHierarchyChanged(bool is_add, |
119 View* parent, | 119 View* parent, |
120 View* child) OVERRIDE { | 120 View* child) OVERRIDE { |
121 if (is_add && child == this) | 121 if (is_add && child == this) |
122 InitExamplesWindow(); | 122 InitExamplesWindow(); |
123 } | 123 } |
124 | 124 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 widget->Show(); | 218 widget->Show(); |
219 } | 219 } |
220 } | 220 } |
221 | 221 |
222 void LogStatus(const std::string& string) { | 222 void LogStatus(const std::string& string) { |
223 ExamplesWindowContents::instance()->SetStatus(string); | 223 ExamplesWindowContents::instance()->SetStatus(string); |
224 } | 224 } |
225 | 225 |
226 } // namespace examples | 226 } // namespace examples |
227 } // namespace views | 227 } // namespace views |
OLD | NEW |