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

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

Issue 1184523003: attachment broker wip (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor comments. Created 5 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
« no previous file with comments | « win8/viewer/metro_viewer_process_host.h ('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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void MetroViewerProcessHost::InternalMessageFilter::OnChannelConnected( 43 void MetroViewerProcessHost::InternalMessageFilter::OnChannelConnected(
44 int32 peer_pid) { 44 int32 peer_pid) {
45 owner_->NotifyChannelConnected(); 45 owner_->NotifyChannelConnected();
46 } 46 }
47 47
48 MetroViewerProcessHost::InternalMessageFilter::~InternalMessageFilter() { 48 MetroViewerProcessHost::InternalMessageFilter::~InternalMessageFilter() {
49 } 49 }
50 50
51 MetroViewerProcessHost::MetroViewerProcessHost( 51 MetroViewerProcessHost::MetroViewerProcessHost(
52 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) { 52 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
53 IPC::AttachmentBroker* attachment_broker) {
53 DCHECK(!instance_); 54 DCHECK(!instance_);
54 instance_ = this; 55 instance_ = this;
55 56
56 channel_ = IPC::ChannelProxy::Create(kMetroViewerIPCChannelName, 57 channel_ = IPC::ChannelProxy::Create(kMetroViewerIPCChannelName,
57 IPC::Channel::MODE_NAMED_SERVER, 58 IPC::Channel::MODE_NAMED_SERVER, this,
58 this, 59 ipc_task_runner, attachment_broker);
59 ipc_task_runner);
60 } 60 }
61 61
62 MetroViewerProcessHost::~MetroViewerProcessHost() { 62 MetroViewerProcessHost::~MetroViewerProcessHost() {
63 if (!channel_) { 63 if (!channel_) {
64 instance_ = NULL; 64 instance_ = NULL;
65 return; 65 return;
66 } 66 }
67 67
68 base::ProcessId viewer_process_id = GetViewerProcessId(); 68 base::ProcessId viewer_process_id = GetViewerProcessId();
69 channel_->Close(); 69 channel_->Close();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 const base::FilePath& folder) { 336 const base::FilePath& folder) {
337 if (success) 337 if (success)
338 select_folder_completion_callback_.Run(base::FilePath(folder), 0, NULL); 338 select_folder_completion_callback_.Run(base::FilePath(folder), 0, NULL);
339 else 339 else
340 failure_callback_.Run(NULL); 340 failure_callback_.Run(NULL);
341 select_folder_completion_callback_.Reset(); 341 select_folder_completion_callback_.Reset();
342 failure_callback_.Reset(); 342 failure_callback_.Reset();
343 } 343 }
344 344
345 } // namespace win8 345 } // namespace win8
OLDNEW
« no previous file with comments | « win8/viewer/metro_viewer_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698