| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 void ShowExamplesWindowWithContent(Operation operation, | 205 void ShowExamplesWindowWithContent(Operation operation, |
| 206 content::BrowserContext* browser_context) { | 206 content::BrowserContext* browser_context) { |
| 207 if (ExamplesWindowContents::instance()) { | 207 if (ExamplesWindowContents::instance()) { |
| 208 ExamplesWindowContents::instance()->GetWidget()->Activate(); | 208 ExamplesWindowContents::instance()->GetWidget()->Activate(); |
| 209 } else { | 209 } else { |
| 210 Widget* widget = new Widget; | 210 Widget* widget = new Widget; |
| 211 Widget::InitParams params; | 211 Widget::InitParams params; |
| 212 params.delegate = new ExamplesWindowContents(operation, browser_context); | 212 params.delegate = new ExamplesWindowContents(operation, browser_context); |
| 213 params.bounds = gfx::Rect(0, 0, 850, 300); | 213 params.bounds = gfx::Rect(0, 0, 850, 300); |
| 214 #if defined(USE_AURA) && !defined(OS_CHROMEOS) | |
| 215 if (CommandLine::ForCurrentProcess()->HasSwitch("win-aura")) | |
| 216 params.native_widget = new DesktopNativeWidgetAura(widget); | |
| 217 #endif | |
| 218 widget->Init(params); | 214 widget->Init(params); |
| 219 widget->Show(); | 215 widget->Show(); |
| 220 } | 216 } |
| 221 } | 217 } |
| 222 | 218 |
| 223 void LogStatus(const std::string& string) { | 219 void LogStatus(const std::string& string) { |
| 224 ExamplesWindowContents::instance()->SetStatus(string); | 220 ExamplesWindowContents::instance()->SetStatus(string); |
| 225 } | 221 } |
| 226 | 222 |
| 227 } // namespace examples | 223 } // namespace examples |
| 228 } // namespace views | 224 } // namespace views |
| OLD | NEW |