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

Unified Diff: remoting/host/continue_window_win.cc

Issue 12189013: Relanding r180433, now without build/some.gyp. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/branding_Chromium ('k') | remoting/host/desktop_process_main.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/continue_window_win.cc
diff --git a/remoting/host/continue_window_win.cc b/remoting/host/continue_window_win.cc
index 76cc42b0493639631eb30d474ddc57c1bb95f02b..fc03615a1d0bc9d9b245f72d8bd94d57bdfeb9c9 100644
--- a/remoting/host/continue_window_win.cc
+++ b/remoting/host/continue_window_win.cc
@@ -8,21 +8,16 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/process_util.h"
#include "base/utf_string_conversions.h"
-#include "remoting/host/host_ui_resource.h"
#include "remoting/host/ui_strings.h"
+#include "remoting/host/win/core_resource.h"
// TODO(garykac): Lots of duplicated code in this file and
// disconnect_window_win.cc. These global floating windows are temporary so
// they should be deleted soon. If we need to expand this then we should
// create a class with the shared code.
-// HMODULE from DllMain/WinMain. This is needed to find our dialog resource.
-// This is defined in:
-// Plugin: host_plugin.cc
-// SimpleHost: simple_host_process.cc
-extern HMODULE g_hModule;
-
namespace remoting {
class ContinueWindowWin : public ContinueWindow {
@@ -106,8 +101,10 @@ BOOL ContinueWindowWin::OnDialogMessage(HWND hwnd, UINT msg,
void ContinueWindowWin::Show(const ContinueSessionCallback& callback) {
callback_ = callback;
+ HMODULE instance = base::GetModuleFromAddress(&DialogProc);
+
CHECK(!hwnd_);
- hwnd_ = CreateDialogParam(g_hModule, MAKEINTRESOURCE(IDD_CONTINUE), NULL,
+ hwnd_ = CreateDialogParam(instance, MAKEINTRESOURCE(IDD_CONTINUE), NULL,
(DLGPROC)DialogProc, (LPARAM)this);
if (!hwnd_) {
LOG(ERROR) << "Unable to create Disconnect dialog for remoting.";
« no previous file with comments | « remoting/branding_Chromium ('k') | remoting/host/desktop_process_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698