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

Side by Side Diff: chrome/installer/util/html_dialog_impl.cc

Issue 1109043003: Apply automated fixits for Chrome clang plugin to chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 #include <mshtmhst.h> 6 #include <mshtmhst.h>
7 #include <urlmon.h> 7 #include <urlmon.h>
8 8
9 #include "base/win/scoped_variant.h" 9 #include "base/win/scoped_variant.h"
10 #include "chrome/installer/util/html_dialog.h" 10 #include "chrome/installer/util/html_dialog.h"
(...skipping 28 matching lines...) Expand all
39 // the values of DialogResult and call window.close(). 39 // the values of DialogResult and call window.close().
40 40
41 class HTMLDialogWin : public HTMLDialog { 41 class HTMLDialogWin : public HTMLDialog {
42 public: 42 public:
43 HTMLDialogWin(const std::wstring& url, const std::wstring& param) 43 HTMLDialogWin(const std::wstring& url, const std::wstring& param)
44 : url_(url), param_(param) { 44 : url_(url), param_(param) {
45 if (!mshtml_) 45 if (!mshtml_)
46 mshtml_ = LoadLibrary(L"MSHTML.DLL"); 46 mshtml_ = LoadLibrary(L"MSHTML.DLL");
47 } 47 }
48 48
49 virtual DialogResult ShowModal(void* parent_window, 49 DialogResult ShowModal(void* parent_window,
50 CustomizationCallback* callback) { 50 CustomizationCallback* callback) override {
51 int result = HTML_DLG_DECLINE; 51 int result = HTML_DLG_DECLINE;
52 if (!InternalDoDialog(callback, &result)) 52 if (!InternalDoDialog(callback, &result))
53 return HTML_DLG_ERROR; 53 return HTML_DLG_ERROR;
54 return static_cast<DialogResult>(result); 54 return static_cast<DialogResult>(result);
55 } 55 }
56 56
57 virtual std::wstring GetExtraResult() { 57 std::wstring GetExtraResult() override { return extra_result_; }
58 return extra_result_;
59 }
60 58
61 private: 59 private:
62 bool InternalDoDialog(CustomizationCallback* callback, int* result); 60 bool InternalDoDialog(CustomizationCallback* callback, int* result);
63 static LRESULT CALLBACK MsgFilter(int code, WPARAM wParam, LPARAM lParam); 61 static LRESULT CALLBACK MsgFilter(int code, WPARAM wParam, LPARAM lParam);
64 62
65 std::wstring url_; 63 std::wstring url_;
66 std::wstring param_; 64 std::wstring param_;
67 static HHOOK hook_; 65 static HHOOK hook_;
68 static HINSTANCE mshtml_; 66 static HINSTANCE mshtml_;
69 static CustomizationCallback* callback_; 67 static CustomizationCallback* callback_;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 HTMLDialog::DialogResult dr = dialog_->ShowModal(NULL, &customizer); 185 HTMLDialog::DialogResult dr = dialog_->ShowModal(NULL, &customizer);
188 if (HTMLDialog::HTML_DLG_ACCEPT == dr) 186 if (HTMLDialog::HTML_DLG_ACCEPT == dr)
189 return EulaHTMLDialog::ACCEPTED; 187 return EulaHTMLDialog::ACCEPTED;
190 else if (HTMLDialog::HTML_DLG_EXTRA == dr) 188 else if (HTMLDialog::HTML_DLG_EXTRA == dr)
191 return EulaHTMLDialog::ACCEPTED_OPT_IN; 189 return EulaHTMLDialog::ACCEPTED_OPT_IN;
192 else 190 else
193 return EulaHTMLDialog::REJECTED; 191 return EulaHTMLDialog::REJECTED;
194 } 192 }
195 193
196 } // namespace installer 194 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/html_dialog.h ('k') | chrome/installer/util/installation_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698