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

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

Issue 303543004: MacViews: views_examples_with_content_exe working! Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add files Created 6 years, 7 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 | « ui/views/examples/examples_window.h ('k') | ui/views/test/child_modal_window.cc » ('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.h" 5 #include "ui/views/examples/examples_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 Label* status_label_; 203 Label* status_label_;
204 const Operation operation_; 204 const Operation operation_;
205 205
206 DISALLOW_COPY_AND_ASSIGN(ExamplesWindowContents); 206 DISALLOW_COPY_AND_ASSIGN(ExamplesWindowContents);
207 }; 207 };
208 208
209 // static 209 // static
210 ExamplesWindowContents* ExamplesWindowContents::instance_ = NULL; 210 ExamplesWindowContents* ExamplesWindowContents::instance_ = NULL;
211 211
212 void ShowExamplesWindow(Operation operation, 212 void ShowExamplesWindow(Operation operation,
213 aura::Window* window_context, 213 gfx::NativeView window_context,
214 ScopedExamples extra_examples) { 214 ScopedExamples extra_examples) {
215 if (ExamplesWindowContents::instance()) { 215 if (ExamplesWindowContents::instance()) {
216 ExamplesWindowContents::instance()->GetWidget()->Activate(); 216 ExamplesWindowContents::instance()->GetWidget()->Activate();
217 } else { 217 } else {
218 ScopedExamples examples(GetExamplesToShow(extra_examples.Pass())); 218 ScopedExamples examples(GetExamplesToShow(extra_examples.Pass()));
219 Widget* widget = new Widget; 219 Widget* widget = new Widget;
220 Widget::InitParams params; 220 Widget::InitParams params;
221 params.delegate = new ExamplesWindowContents(operation, examples.Pass()); 221 params.delegate = new ExamplesWindowContents(operation, examples.Pass());
222 params.context = window_context; 222 params.context = window_context;
223 params.bounds = gfx::Rect(0, 0, 850, 300); 223 params.bounds = gfx::Rect(0, 0, 850, 300);
224 params.remove_standard_frame = true; 224 params.remove_standard_frame = true;
225 widget->Init(params); 225 widget->Init(params);
226 widget->Show(); 226 widget->Show();
227 } 227 }
228 } 228 }
229 229
230 void LogStatus(const std::string& string) { 230 void LogStatus(const std::string& string) {
231 ExamplesWindowContents::instance()->SetStatus(string); 231 ExamplesWindowContents::instance()->SetStatus(string);
232 } 232 }
233 233
234 } // namespace examples 234 } // namespace examples
235 } // namespace views 235 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/examples_window.h ('k') | ui/views/test/child_modal_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698