OLD | NEW |
---|---|
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" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
541 void NexeLoadManager::set_exit_status(int exit_status) { | 541 void NexeLoadManager::set_exit_status(int exit_status) { |
542 exit_status_ = exit_status; | 542 exit_status_ = exit_status; |
543 ppapi::ScopedPPVar exit_status_name_var( | 543 ppapi::ScopedPPVar exit_status_name_var( |
544 ppapi::ScopedPPVar::PassRef(), | 544 ppapi::ScopedPPVar::PassRef(), |
545 ppapi::StringVar::StringToPPVar("exitStatus")); | 545 ppapi::StringVar::StringToPPVar("exitStatus")); |
546 SetReadOnlyProperty(exit_status_name_var.get(), PP_MakeInt32(exit_status)); | 546 SetReadOnlyProperty(exit_status_name_var.get(), PP_MakeInt32(exit_status)); |
547 } | 547 } |
548 | 548 |
549 void NexeLoadManager::InitializePlugin() { | 549 void NexeLoadManager::InitializePlugin() { |
550 init_time_ = base::Time::Now(); | 550 init_time_ = base::Time::Now(); |
551 | |
552 #if defined(OS_MACOSX) | |
553 // TODO(kochi): For crbug.com/102808, this is a stopgap solution for Lion | |
554 // until we expose IME API to .nexe. This disables any IME interference | |
555 // against key inputs, so you cannot use off-the-spot IME input for NaCl | |
556 // apps. | |
557 // This makes discrepancy among platforms and therefore we should remove | |
558 // this hack when IME API is made available. | |
559 // The default for non-Mac platforms is still off-the-spot IME mode. | |
560 plugin_instance_->SetTextInputType(ui::TEXT_INPUT_TYPE_NONE); | |
dmichael (off chromium)
2014/04/24 15:49:44
+kochi: Is this comment and code still valid? The
| |
561 #endif // defined(OS_MACOSX) | |
551 } | 562 } |
552 | 563 |
553 void NexeLoadManager::ReportStartupOverhead() const { | 564 void NexeLoadManager::ReportStartupOverhead() const { |
554 base::TimeDelta overhead = base::Time::Now() - init_time_; | 565 base::TimeDelta overhead = base::Time::Now() - init_time_; |
555 HistogramStartupTimeMedium( | 566 HistogramStartupTimeMedium( |
556 "NaCl.Perf.StartupTime.NaClOverhead", overhead, nexe_size_); | 567 "NaCl.Perf.StartupTime.NaClOverhead", overhead, nexe_size_); |
557 } | 568 } |
558 | 569 |
559 bool NexeLoadManager::RequestNaClManifest(const std::string& url, | 570 bool NexeLoadManager::RequestNaClManifest(const std::string& url, |
560 bool* is_data_uri) { | 571 bool* is_data_uri) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
618 // to provide error handling. | 629 // to provide error handling. |
619 } | 630 } |
620 | 631 |
621 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { | 632 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { |
622 base::StringTokenizer t(crash_log, "\n"); | 633 base::StringTokenizer t(crash_log, "\n"); |
623 while (t.GetNext()) | 634 while (t.GetNext()) |
624 LogToConsole(t.token()); | 635 LogToConsole(t.token()); |
625 } | 636 } |
626 | 637 |
627 } // namespace nacl | 638 } // namespace nacl |
OLD | NEW |