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

Side by Side Diff: chrome/browser/metro_viewer/metro_viewer_process_host_win.cc

Issue 14576015: In WinAura, also kill the Metro viewer process in AttemptExit(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed NOTREACHED() as discussed Created 7 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/metro_viewer/metro_viewer_process_host_win.h" 5 #include "chrome/browser/metro_viewer/metro_viewer_process_host_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/ui/ash/ash_init.h" 9 #include "chrome/browser/ui/ash/ash_init.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ipc_channel_name.c_str(), 47 ipc_channel_name.c_str(),
48 IPC::Channel::MODE_NAMED_SERVER, 48 IPC::Channel::MODE_NAMED_SERVER,
49 this, 49 this,
50 content::BrowserThread::GetMessageLoopProxyForThread( 50 content::BrowserThread::GetMessageLoopProxyForThread(
51 content::BrowserThread::IO))); 51 content::BrowserThread::IO)));
52 } 52 }
53 53
54 MetroViewerProcessHost::~MetroViewerProcessHost() { 54 MetroViewerProcessHost::~MetroViewerProcessHost() {
55 } 55 }
56 56
57 base::ProcessId MetroViewerProcessHost::GetViewerProcessId() {
58 if (channel_)
59 return channel_->peer_pid();
60 else
sky 2013/05/14 17:17:51 nit: no else.
gab 2013/05/14 17:45:25 Done.
61 return base::kNullProcessId;
62 }
63
57 bool MetroViewerProcessHost::Send(IPC::Message* msg) { 64 bool MetroViewerProcessHost::Send(IPC::Message* msg) {
58 return channel_->Send(msg); 65 return channel_->Send(msg);
59 } 66 }
60 67
61 bool MetroViewerProcessHost::OnMessageReceived(const IPC::Message& message) { 68 bool MetroViewerProcessHost::OnMessageReceived(const IPC::Message& message) {
62 DCHECK(CalledOnValidThread()); 69 DCHECK(CalledOnValidThread());
63 bool handled = true; 70 bool handled = true;
64 IPC_BEGIN_MESSAGE_MAP(MetroViewerProcessHost, message) 71 IPC_BEGIN_MESSAGE_MAP(MetroViewerProcessHost, message)
65 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetTargetSurface, OnSetTargetSurface) 72 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetTargetSurface, OnSetTargetSurface)
66 IPC_MESSAGE_UNHANDLED(handled = false) 73 IPC_MESSAGE_UNHANDLED(handled = false)
(...skipping 18 matching lines...) Expand all
85 void MetroViewerProcessHost::OnSetTargetSurface( 92 void MetroViewerProcessHost::OnSetTargetSurface(
86 gfx::NativeViewId target_surface) { 93 gfx::NativeViewId target_surface) {
87 DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface; 94 DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface;
88 HWND hwnd = reinterpret_cast<HWND>(target_surface); 95 HWND hwnd = reinterpret_cast<HWND>(target_surface);
89 chrome::OpenAsh(); 96 chrome::OpenAsh();
90 scoped_refptr<AcceleratedPresenter> any_window = 97 scoped_refptr<AcceleratedPresenter> any_window =
91 AcceleratedPresenter::GetForWindow(NULL); 98 AcceleratedPresenter::GetForWindow(NULL);
92 any_window->SetNewTargetWindow(hwnd); 99 any_window->SetNewTargetWindow(hwnd);
93 aura::RemoteRootWindowHostWin::Instance()->Connected(this); 100 aura::RemoteRootWindowHostWin::Instance()->Connected(this);
94 } 101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698