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

Side by Side Diff: examples/media_viewer/media_viewer.cc

Issue 745743002: Makes views be initially hidden (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: feedback Created 6 years, 1 month 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
« no previous file with comments | « no previous file | examples/nesting_app/nesting_app.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 // Overridden from ViewManagerDelegate: 246 // Overridden from ViewManagerDelegate:
247 virtual void OnEmbed(ViewManager* view_manager, 247 virtual void OnEmbed(ViewManager* view_manager,
248 View* root, 248 View* root,
249 ServiceProviderImpl* exported_services, 249 ServiceProviderImpl* exported_services,
250 scoped_ptr<ServiceProvider> imported_services) override { 250 scoped_ptr<ServiceProvider> imported_services) override {
251 root_view_ = root; 251 root_view_ = root;
252 view_manager_ = view_manager; 252 view_manager_ = view_manager;
253 253
254 control_view_ = View::Create(view_manager_); 254 control_view_ = View::Create(view_manager_);
255 control_view_->SetVisible(true);
255 root_view_->AddChild(control_view_); 256 root_view_->AddChild(control_view_);
256 257
257 content_view_ = View::Create(view_manager_); 258 content_view_ = View::Create(view_manager_);
259 content_view_->SetVisible(true);
258 root_view_->AddChild(content_view_); 260 root_view_->AddChild(content_view_);
259 261
260 control_panel_.Initialize(control_view_, shell_); 262 control_panel_.Initialize(control_view_, shell_);
261 263
262 LayoutViews(); 264 LayoutViews();
263 root_view_->AddObserver(this); 265 root_view_->AddObserver(this);
264 266
265 content_view_->Embed("TODO"); 267 content_view_->Embed("TODO");
266 } 268 }
267 269
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 DISALLOW_COPY_AND_ASSIGN(MediaViewer); 325 DISALLOW_COPY_AND_ASSIGN(MediaViewer);
324 }; 326 };
325 327
326 } // namespace examples 328 } // namespace examples
327 } // namespace mojo 329 } // namespace mojo
328 330
329 MojoResult MojoMain(MojoHandle shell_handle) { 331 MojoResult MojoMain(MojoHandle shell_handle) {
330 mojo::ApplicationRunnerChromium runner(new mojo::examples::MediaViewer); 332 mojo::ApplicationRunnerChromium runner(new mojo::examples::MediaViewer);
331 return runner.Run(shell_handle); 333 return runner.Run(shell_handle);
332 } 334 }
OLDNEW
« no previous file with comments | « no previous file | examples/nesting_app/nesting_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698