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

Side by Side Diff: remoting/host/plugin/daemon_installer_win.h

Issue 10161034: Making sure that UAC promts fired by the Chromoting plugin get focus (instead of being shown in the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 REMOTING_HOST_DAEMON_INSTALLER_WIN_H_ 5 #ifndef REMOTING_HOST_DAEMON_INSTALLER_WIN_H_
6 #define REMOTING_HOST_DAEMON_INSTALLER_WIN_H_ 6 #define REMOTING_HOST_DAEMON_INSTALLER_WIN_H_
7 7
8 #include <objbase.h> 8 #include <objbase.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "remoting/host/plugin/daemon_controller.h" 13 #include "remoting/host/plugin/daemon_controller.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 class DaemonInstallerWin { 17 class DaemonInstallerWin {
18 public: 18 public:
19 typedef base::Callback<void (HRESULT result)> CompletionCallback; 19 typedef base::Callback<void (HRESULT result)> CompletionCallback;
20 20
21 virtual ~DaemonInstallerWin(); 21 virtual ~DaemonInstallerWin();
22 22
23 // Initiates download and installation of the Chromoting Host. 23 // Initiates download and installation of the Chromoting Host.
24 virtual void Install() = 0; 24 virtual void Install() = 0;
25 25
26 // Creates an instance of the Chromoting Host installer passing the completion 26 // Creates an instance of the Chromoting Host installer passing the completion
27 // callback to be called when the installation finishes. In case of an error 27 // callback to be called when the installation finishes. In case of an error
28 // returns NULL and passed the error code to |done|. 28 // returns NULL and passed the error code to |done|.
29 static scoped_ptr<DaemonInstallerWin> Create(CompletionCallback done); 29 static scoped_ptr<DaemonInstallerWin> Create(HWND window_handle,
30 CompletionCallback done);
30 31
31 protected: 32 protected:
32 DaemonInstallerWin(const CompletionCallback& done); 33 DaemonInstallerWin(const CompletionCallback& done);
33 34
34 // Invokes the completion callback to report the installation result. 35 // Invokes the completion callback to report the installation result.
35 void Done(HRESULT result); 36 void Done(HRESULT result);
36 37
37 private: 38 private:
38 // The completion callback that should be called to report the installation 39 // The completion callback that should be called to report the installation
39 // result. 40 // result.
40 CompletionCallback done_; 41 CompletionCallback done_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(DaemonInstallerWin); 43 DISALLOW_COPY_AND_ASSIGN(DaemonInstallerWin);
43 }; 44 };
44 45
46 // Returns the first top-level (i.e. WS_OVERLAPPED or WS_POPUP) window in
47 // the chain of parents of |window|. Returns |window| if it represents
48 // a top-level window. Returns NULL when |window| is NULL.
49 HWND GetTopLevelWindow(HWND window);
50
45 } // namespace remoting 51 } // namespace remoting
46 52
47 #endif // REMOTING_HOST_DAEMON_INSTALLER_WIN_H_ 53 #endif // REMOTING_HOST_DAEMON_INSTALLER_WIN_H_
OLDNEW
« no previous file with comments | « remoting/host/plugin/daemon_controller_win.cc ('k') | remoting/host/plugin/daemon_installer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698