Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/test/test_metro_viewer_process_host.h" | 5 #include "ash/test/test_metro_viewer_process_host.h" |
| 6 | 6 |
| 7 #include <windef.h> | 7 #include <windef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 } | 23 } |
| 24 | 24 |
| 25 void TestMetroViewerProcessHost::TerminateViewer() { | 25 void TestMetroViewerProcessHost::TerminateViewer() { |
| 26 base::ProcessId viewer_process_id = GetViewerProcessId(); | 26 base::ProcessId viewer_process_id = GetViewerProcessId(); |
| 27 if (viewer_process_id != base::kNullProcessId) { | 27 if (viewer_process_id != base::kNullProcessId) { |
| 28 base::Process viewer_process = base::Process::OpenWithAccess( | 28 base::Process viewer_process = base::Process::OpenWithAccess( |
| 29 viewer_process_id, | 29 viewer_process_id, |
| 30 PROCESS_QUERY_INFORMATION | SYNCHRONIZE | PROCESS_TERMINATE); | 30 PROCESS_QUERY_INFORMATION | SYNCHRONIZE | PROCESS_TERMINATE); |
| 31 if (viewer_process.IsValid()) { | 31 if (viewer_process.IsValid()) { |
| 32 viewer_process.Terminate(0, false); | 32 viewer_process.Terminate(0, false); |
| 33 int exit_code; | 33 viewer_process.WaitForExit(NULL); |
|
Lei Zhang
2015/05/06 08:05:15
NULL -> nullptr
Search for "nullptr" on https://c
| |
| 34 viewer_process.WaitForExit(&exit_code); | |
| 35 } | 34 } |
| 36 } | 35 } |
| 37 } | 36 } |
| 38 | 37 |
| 39 void TestMetroViewerProcessHost::OnChannelError() { | 38 void TestMetroViewerProcessHost::OnChannelError() { |
| 40 closed_unexpectedly_ = true; | 39 closed_unexpectedly_ = true; |
| 41 aura::RemoteWindowTreeHostWin::Instance()->Disconnected(); | 40 aura::RemoteWindowTreeHostWin::Instance()->Disconnected(); |
| 42 } | 41 } |
| 43 | 42 |
| 44 void TestMetroViewerProcessHost::OnSetTargetSurface( | 43 void TestMetroViewerProcessHost::OnSetTargetSurface( |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 57 void TestMetroViewerProcessHost::OnHandleSearchRequest( | 56 void TestMetroViewerProcessHost::OnHandleSearchRequest( |
| 58 const base::string16& search_string) { | 57 const base::string16& search_string) { |
| 59 } | 58 } |
| 60 | 59 |
| 61 void TestMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, | 60 void TestMetroViewerProcessHost::OnWindowSizeChanged(uint32 width, |
| 62 uint32 height) { | 61 uint32 height) { |
| 63 } | 62 } |
| 64 | 63 |
| 65 } // namespace test | 64 } // namespace test |
| 66 } // namespace ash | 65 } // namespace ash |
| OLD | NEW |