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

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

Issue 692693002: Make it possible to change the viewport size (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix style nits 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 | « mojo/services/window_manager/window_manager_app.cc ('k') | no next file » | 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 "mojo/application/application_runner_chromium.h" 5 #include "mojo/application/application_runner_chromium.h"
6 #include "mojo/public/c/system/main.h" 6 #include "mojo/public/c/system/main.h"
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/public/cpp/application/connect.h" 9 #include "mojo/public/cpp/application/connect.h"
10 #include "mojo/public/cpp/application/service_provider_impl.h" 10 #include "mojo/public/cpp/application/service_provider_impl.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 virtual void OnEmbed( 58 virtual void OnEmbed(
59 mojo::ViewManager* view_manager, 59 mojo::ViewManager* view_manager,
60 mojo::View* root, 60 mojo::View* root,
61 mojo::ServiceProviderImpl* exported_services, 61 mojo::ServiceProviderImpl* exported_services,
62 scoped_ptr<mojo::ServiceProvider> imported_services) override { 62 scoped_ptr<mojo::ServiceProvider> imported_services) override {
63 view_manager_ = view_manager; 63 view_manager_ = view_manager;
64 64
65 root_ = root; 65 root_ = root;
66 root_->AddObserver(this); 66 root_->AddObserver(this);
67 67
68 window_manager_app_->SetViewportSize(gfx::Size(320, 640));
69
68 content_ = mojo::View::Create(view_manager_); 70 content_ = mojo::View::Create(view_manager_);
69 content_->SetBounds(root_->bounds()); 71 content_->SetBounds(root_->bounds());
70 root_->AddChild(content_); 72 root_->AddChild(content_);
71 73
72 window_manager_app_->InitFocus( 74 window_manager_app_->InitFocus(
73 new FocusRules(window_manager_app_.get(), content_)); 75 new FocusRules(window_manager_app_.get(), content_));
74 76
75 if (!pending_url_.empty()) 77 if (!pending_url_.empty())
76 NavigateToURL(pending_url_); 78 NavigateToURL(pending_url_);
77 } 79 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 133
132 DISALLOW_COPY_AND_ASSIGN(SkyDebugger); 134 DISALLOW_COPY_AND_ASSIGN(SkyDebugger);
133 }; 135 };
134 136
135 } // namespace sky 137 } // namespace sky
136 138
137 MojoResult MojoMain(MojoHandle shell_handle) { 139 MojoResult MojoMain(MojoHandle shell_handle) {
138 mojo::ApplicationRunnerChromium runner(new sky::SkyDebugger); 140 mojo::ApplicationRunnerChromium runner(new sky::SkyDebugger);
139 return runner.Run(shell_handle); 141 return runner.Run(shell_handle);
140 } 142 }
OLDNEW
« no previous file with comments | « mojo/services/window_manager/window_manager_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698