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

Side by Side Diff: components/nacl/renderer/nexe_load_manager.cc

Issue 231793003: Add IPC Channel for new ManifestService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
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 "components/nacl/renderer/nexe_load_manager.h" 5 #include "components/nacl/renderer/nexe_load_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_tokenizer.h" 10 #include "base/strings/string_tokenizer.h"
11 #include "components/nacl/common/nacl_host_messages.h" 11 #include "components/nacl/common/nacl_host_messages.h"
12 #include "components/nacl/common/nacl_types.h" 12 #include "components/nacl/common/nacl_types.h"
13 #include "components/nacl/renderer/embedder_service_channel.h"
13 #include "components/nacl/renderer/pnacl_translation_resource_host.h" 14 #include "components/nacl/renderer/pnacl_translation_resource_host.h"
14 #include "components/nacl/renderer/sandbox_arch.h" 15 #include "components/nacl/renderer/sandbox_arch.h"
15 #include "components/nacl/renderer/trusted_plugin_channel.h" 16 #include "components/nacl/renderer/trusted_plugin_channel.h"
16 #include "content/public/common/content_client.h" 17 #include "content/public/common/content_client.h"
17 #include "content/public/common/content_switches.h" 18 #include "content/public/common/content_switches.h"
18 #include "content/public/common/sandbox_init.h" 19 #include "content/public/common/sandbox_init.h"
19 #include "content/public/renderer/pepper_plugin_instance.h" 20 #include "content/public/renderer/pepper_plugin_instance.h"
20 #include "content/public/renderer/render_thread.h" 21 #include "content/public/renderer/render_thread.h"
21 #include "content/public/renderer/render_view.h" 22 #include "content/public/renderer/render_view.h"
22 #include "content/public/renderer/renderer_ppapi_host.h" 23 #include "content/public/renderer/renderer_ppapi_host.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 event.total_bytes); 359 event.total_bytes);
359 container->element().dispatchEvent(blink_event); 360 container->element().dispatchEvent(blink_event);
360 } 361 }
361 } 362 }
362 363
363 void NexeLoadManager::set_trusted_plugin_channel( 364 void NexeLoadManager::set_trusted_plugin_channel(
364 scoped_ptr<TrustedPluginChannel> channel) { 365 scoped_ptr<TrustedPluginChannel> channel) {
365 trusted_plugin_channel_ = channel.Pass(); 366 trusted_plugin_channel_ = channel.Pass();
366 } 367 }
367 368
369 void NexeLoadManager::set_embedder_service_channel(
370 scoped_ptr<EmbedderServiceChannel> channel) {
371 embedder_service_channel_ = channel.Pass();
372 }
373
368 PP_NaClReadyState NexeLoadManager::nacl_ready_state() { 374 PP_NaClReadyState NexeLoadManager::nacl_ready_state() {
369 return nacl_ready_state_; 375 return nacl_ready_state_;
370 } 376 }
371 377
372 void NexeLoadManager::set_nacl_ready_state(PP_NaClReadyState ready_state) { 378 void NexeLoadManager::set_nacl_ready_state(PP_NaClReadyState ready_state) {
373 nacl_ready_state_ = ready_state; 379 nacl_ready_state_ = ready_state;
374 ppapi::ScopedPPVar ready_state_name( 380 ppapi::ScopedPPVar ready_state_name(
375 ppapi::ScopedPPVar::PassRef(), 381 ppapi::ScopedPPVar::PassRef(),
376 ppapi::StringVar::StringToPPVar("readyState")); 382 ppapi::StringVar::StringToPPVar("readyState"));
377 SetReadOnlyProperty(ready_state_name.get(), PP_MakeInt32(ready_state)); 383 SetReadOnlyProperty(ready_state_name.get(), PP_MakeInt32(ready_state));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // to provide error handling. 439 // to provide error handling.
434 } 440 }
435 441
436 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { 442 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) {
437 base::StringTokenizer t(crash_log, "\n"); 443 base::StringTokenizer t(crash_log, "\n");
438 while (t.GetNext()) 444 while (t.GetNext())
439 LogToConsole(t.token()); 445 LogToConsole(t.token());
440 } 446 }
441 447
442 } // namespace nacl 448 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698