| 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/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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 Label* status_label_; | 190 Label* status_label_; |
| 191 const Operation operation_; | 191 const Operation operation_; |
| 192 content::BrowserContext* browser_context_; | 192 content::BrowserContext* browser_context_; |
| 193 | 193 |
| 194 DISALLOW_COPY_AND_ASSIGN(ExamplesWindowContents); | 194 DISALLOW_COPY_AND_ASSIGN(ExamplesWindowContents); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 // static | 197 // static |
| 198 ExamplesWindowContents* ExamplesWindowContents::instance_ = NULL; | 198 ExamplesWindowContents* ExamplesWindowContents::instance_ = NULL; |
| 199 | 199 |
| 200 void ShowExamplesWindow(Operation operation, | 200 void ShowExamplesWindowWithContent(Operation operation, |
| 201 content::BrowserContext* browser_context) { | 201 content::BrowserContext* browser_context) { |
| 202 if (ExamplesWindowContents::instance()) { | 202 if (ExamplesWindowContents::instance()) { |
| 203 ExamplesWindowContents::instance()->GetWidget()->Activate(); | 203 ExamplesWindowContents::instance()->GetWidget()->Activate(); |
| 204 } else { | 204 } else { |
| 205 Widget::CreateWindowWithBounds(new ExamplesWindowContents(operation, | 205 Widget::CreateWindowWithBounds(new ExamplesWindowContents(operation, |
| 206 browser_context), | 206 browser_context), |
| 207 gfx::Rect(0, 0, 850, 300))->Show(); | 207 gfx::Rect(0, 0, 850, 300))->Show(); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| 211 void LogStatus(const std::string& string) { | 211 void LogStatus(const std::string& string) { |
| 212 ExamplesWindowContents::instance()->SetStatus(string); | 212 ExamplesWindowContents::instance()->SetStatus(string); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace examples | 215 } // namespace examples |
| 216 } // namespace views | 216 } // namespace views |
| OLD | NEW |