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

Side by Side Diff: sky/tools/tester/tester.cc

Issue 745743002: Makes views be initially hidden (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: feedback Created 6 years 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 | « sky/tools/debugger/debugger.cc ('k') | sky/viewer/document_view.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 <iostream> 5 #include <iostream>
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/public/c/system/main.h" 9 #include "mojo/public/c/system/main.h"
10 #include "mojo/public/cpp/application/application_delegate.h" 10 #include "mojo/public/cpp/application/application_delegate.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 mojo::View* root, 67 mojo::View* root,
68 mojo::ServiceProviderImpl* exported_services, 68 mojo::ServiceProviderImpl* exported_services,
69 scoped_ptr<mojo::ServiceProvider> remote_service_provider) override { 69 scoped_ptr<mojo::ServiceProvider> remote_service_provider) override {
70 view_manager_ = view_manager; 70 view_manager_ = view_manager;
71 root_ = root; 71 root_ = root;
72 root_->AddObserver(this); 72 root_->AddObserver(this);
73 73
74 content_ = mojo::View::Create(view_manager_); 74 content_ = mojo::View::Create(view_manager_);
75 content_->SetBounds(root_->bounds()); 75 content_->SetBounds(root_->bounds());
76 root_->AddChild(content_); 76 root_->AddChild(content_);
77 content_->SetVisible(true);
77 78
78 std::cout << "#READY\n"; 79 std::cout << "#READY\n";
79 std::cout.flush(); 80 std::cout.flush();
80 ScheduleRun(); 81 ScheduleRun();
81 } 82 }
82 83
83 // Overridden from WindowManagerDelegate: 84 // Overridden from WindowManagerDelegate:
84 virtual void Embed( 85 virtual void Embed(
85 const mojo::String& url, 86 const mojo::String& url,
86 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider) override { 87 mojo::InterfaceRequest<mojo::ServiceProvider> service_provider) override {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 DISALLOW_COPY_AND_ASSIGN(SkyTester); 140 DISALLOW_COPY_AND_ASSIGN(SkyTester);
140 }; 141 };
141 142
142 } // namespace tester 143 } // namespace tester
143 } // namespace examples 144 } // namespace examples
144 145
145 MojoResult MojoMain(MojoHandle shell_handle) { 146 MojoResult MojoMain(MojoHandle shell_handle) {
146 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester); 147 mojo::ApplicationRunnerChromium runner(new sky::tester::SkyTester);
147 return runner.Run(shell_handle); 148 return runner.Run(shell_handle);
148 } 149 }
OLDNEW
« no previous file with comments | « sky/tools/debugger/debugger.cc ('k') | sky/viewer/document_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698