Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: ui/views/examples/examples_window_with_content.cc

Issue 10913237: Allow the Views Delegate to provide the native widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_aura.cc ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/shell/shell_aura.cc ('k') | ui/views/test/test_views_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698