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

Side by Side Diff: win8/viewer/metro_viewer_process_host.cc

Issue 310293002: Make IPC::Channel polymorphic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt to fix build breakage Created 6 years, 6 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
« no previous file with comments | « ipc/ipc_test_sink.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 (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 "win8/viewer/metro_viewer_process_host.h" 5 #include "win8/viewer/metro_viewer_process_host.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ::CloseHandle(viewer_process); 78 ::CloseHandle(viewer_process);
79 } 79 }
80 } 80 }
81 channel_->RemoveFilter(message_filter_); 81 channel_->RemoveFilter(message_filter_);
82 } 82 }
83 instance_ = NULL; 83 instance_ = NULL;
84 } 84 }
85 85
86 base::ProcessId MetroViewerProcessHost::GetViewerProcessId() { 86 base::ProcessId MetroViewerProcessHost::GetViewerProcessId() {
87 if (channel_) 87 if (channel_)
88 return channel_->peer_pid(); 88 return channel_->GetPeerPID();
89 return base::kNullProcessId; 89 return base::kNullProcessId;
90 } 90 }
91 91
92 bool MetroViewerProcessHost::LaunchViewerAndWaitForConnection( 92 bool MetroViewerProcessHost::LaunchViewerAndWaitForConnection(
93 const base::string16& app_user_model_id) { 93 const base::string16& app_user_model_id) {
94 DCHECK_EQ(base::kNullProcessId, channel_->peer_pid()); 94 DCHECK_EQ(base::kNullProcessId, channel_->GetPeerPID());
95 95
96 channel_connected_event_.reset(new base::WaitableEvent(false, false)); 96 channel_connected_event_.reset(new base::WaitableEvent(false, false));
97 97
98 message_filter_ = new InternalMessageFilter(this); 98 message_filter_ = new InternalMessageFilter(this);
99 channel_->AddFilter(message_filter_); 99 channel_->AddFilter(message_filter_);
100 100
101 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { 101 if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
102 base::win::ScopedComPtr<IApplicationActivationManager> activator; 102 base::win::ScopedComPtr<IApplicationActivationManager> activator;
103 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); 103 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager);
104 if (SUCCEEDED(hr)) { 104 if (SUCCEEDED(hr)) {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 const base::FilePath& folder) { 335 const base::FilePath& folder) {
336 if (success) 336 if (success)
337 select_folder_completion_callback_.Run(base::FilePath(folder), 0, NULL); 337 select_folder_completion_callback_.Run(base::FilePath(folder), 0, NULL);
338 else 338 else
339 failure_callback_.Run(NULL); 339 failure_callback_.Run(NULL);
340 select_folder_completion_callback_.Reset(); 340 select_folder_completion_callback_.Reset();
341 failure_callback_.Reset(); 341 failure_callback_.Reset();
342 } 342 }
343 343
344 } // namespace win8 344 } // namespace win8
OLDNEW
« no previous file with comments | « ipc/ipc_test_sink.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698