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

Side by Side Diff: sky/shell/shell.cc

Issue 962383003: Make shake-to-reload actually work (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « sky/shell/org/domokit/sky/shell/JavaServiceProvider.java ('k') | sky/shell/ui/engine.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "sky/shell/shell.h" 5 #include "sky/shell/shell.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "mojo/common/message_pump_mojo.h" 9 #include "mojo/common/message_pump_mojo.h"
10 #include "mojo/edk/embedder/embedder.h" 10 #include "mojo/edk/embedder/embedder.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 gpu_thread_->StartWithOptions(options); 57 gpu_thread_->StartWithOptions(options);
58 58
59 rasterizer_.reset(new Rasterizer()); 59 rasterizer_.reset(new Rasterizer());
60 } 60 }
61 61
62 void Shell::InitUI(const base::Thread::Options& options) { 62 void Shell::InitUI(const base::Thread::Options& options) {
63 ui_thread_.reset(new base::Thread("ui_thread")); 63 ui_thread_.reset(new base::Thread("ui_thread"));
64 ui_thread_->StartWithOptions(options); 64 ui_thread_->StartWithOptions(options);
65 65
66 Engine::Config config; 66 Engine::Config config;
67 config.java_task_runner = java_task_runner_;
67 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner(); 68 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner();
68 config.gpu_delegate = rasterizer_->GetWeakPtr(); 69 config.gpu_delegate = rasterizer_->GetWeakPtr();
69 engine_.reset(new Engine(config)); 70 engine_.reset(new Engine(config));
70 71
71 ui_thread_->message_loop()->PostTask( 72 ui_thread_->message_loop()->PostTask(
72 FROM_HERE, base::Bind(&Engine::Init, engine_->GetWeakPtr(), 73 FROM_HERE, base::Bind(&Engine::Init, engine_->GetWeakPtr()));
73 base::Passed(CreateJavaServiceProvider())));
74 } 74 }
75 75
76 void Shell::InitView() { 76 void Shell::InitView() {
77 PlatformView::Config config; 77 PlatformView::Config config;
78 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner(); 78 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner();
79 config.gpu_delegate = rasterizer_->GetWeakPtr(); 79 config.gpu_delegate = rasterizer_->GetWeakPtr();
80 config.ui_task_runner = ui_thread_->message_loop()->task_runner(); 80 config.ui_task_runner = ui_thread_->message_loop()->task_runner();
81 config.ui_delegate = engine_->GetWeakPtr(); 81 config.ui_delegate = engine_->GetWeakPtr();
82 view_.reset(new PlatformView(config)); 82 view_.reset(new PlatformView(config));
83 } 83 }
84 84
85 } // namespace shell 85 } // namespace shell
86 } // namespace sky 86 } // namespace sky
OLDNEW
« no previous file with comments | « sky/shell/org/domokit/sky/shell/JavaServiceProvider.java ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698