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

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

Issue 14576015: In WinAura, also kill the Metro viewer process in AttemptExit(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r201426 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 #ifndef CHROME_BROWSER_METRO_VIEWER_METRO_VIEWER_PROCESS_HOST_WIN_H_ 5 #ifndef CHROME_BROWSER_METRO_VIEWER_METRO_VIEWER_PROCESS_HOST_WIN_H_
6 #define CHROME_BROWSER_METRO_VIEWER_METRO_VIEWER_PROCESS_HOST_WIN_H_ 6 #define CHROME_BROWSER_METRO_VIEWER_METRO_VIEWER_PROCESS_HOST_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/process_util.h"
11 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
12 #include "ipc/ipc_listener.h" 13 #include "ipc/ipc_listener.h"
13 #include "ipc/ipc_sender.h" 14 #include "ipc/ipc_sender.h"
14 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
15 16
16 namespace IPC { 17 namespace IPC {
17 class ChannelProxy; 18 class ChannelProxy;
18 } 19 }
19 20
20 class MetroViewerProcessHost : public IPC::Listener, 21 class MetroViewerProcessHost : public IPC::Listener,
21 public IPC::Sender, 22 public IPC::Sender,
22 public base::NonThreadSafe { 23 public base::NonThreadSafe {
23 public: 24 public:
24 explicit MetroViewerProcessHost(const std::string& ipc_channel_name); 25 explicit MetroViewerProcessHost(const std::string& ipc_channel_name);
25 virtual ~MetroViewerProcessHost(); 26 virtual ~MetroViewerProcessHost();
26 27
28 // Returns the process id of the viewer process if one is connected to this
29 // host, returns base::kNullProcessId otherwise.
30 base::ProcessId GetViewerProcessId();
31
27 private: 32 private:
28 // IPC::Sender implementation: 33 // IPC::Sender implementation:
29 virtual bool Send(IPC::Message* msg) OVERRIDE; 34 virtual bool Send(IPC::Message* msg) OVERRIDE;
30 35
31 // IPC::Listener implementation: 36 // IPC::Listener implementation:
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
33 virtual void OnChannelError() OVERRIDE; 38 virtual void OnChannelError() OVERRIDE;
34 39
35 void OnSetTargetSurface(gfx::NativeViewId target_surface); 40 void OnSetTargetSurface(gfx::NativeViewId target_surface);
36 41
37 scoped_ptr<IPC::ChannelProxy> channel_; 42 scoped_ptr<IPC::ChannelProxy> channel_;
38 43
39 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost); 44 DISALLOW_COPY_AND_ASSIGN(MetroViewerProcessHost);
40 }; 45 };
41 46
42 #endif // CHROME_BROWSER_METRO_VIEWER_METRO_VIEWER_PROCESS_HOST_WIN_H_ 47 #endif // CHROME_BROWSER_METRO_VIEWER_METRO_VIEWER_PROCESS_HOST_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/browser/metro_viewer/metro_viewer_process_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698