| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 #pragma comment(lib, "urlmon.lib") | |
| 13 | |
| 14 namespace installer { | 12 namespace installer { |
| 15 | 13 |
| 16 // Windows implementation of the HTML dialog class. The main danger with | 14 // Windows implementation of the HTML dialog class. The main danger with |
| 17 // using the IE embedded control as a child window of a custom window is that | 15 // using the IE embedded control as a child window of a custom window is that |
| 18 // it still contains too much browser functionality, allowing the user to do | 16 // it still contains too much browser functionality, allowing the user to do |
| 19 // things that are not expected of a plain dialog. ShowHTMLDialog API solves | 17 // things that are not expected of a plain dialog. ShowHTMLDialog API solves |
| 20 // that problem but gives us a not very customizable frame. We solve that | 18 // that problem but gives us a not very customizable frame. We solve that |
| 21 // using hooks to end up with a robust dialog at the expense of having to do | 19 // using hooks to end up with a robust dialog at the expense of having to do |
| 22 // the buttons in html itself, like so: | 20 // the buttons in html itself, like so: |
| 23 // | 21 // |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 HTMLDialog::DialogResult dr = dialog_->ShowModal(NULL, &customizer); | 183 HTMLDialog::DialogResult dr = dialog_->ShowModal(NULL, &customizer); |
| 186 if (HTMLDialog::HTML_DLG_ACCEPT == dr) | 184 if (HTMLDialog::HTML_DLG_ACCEPT == dr) |
| 187 return EulaHTMLDialog::ACCEPTED; | 185 return EulaHTMLDialog::ACCEPTED; |
| 188 else if (HTMLDialog::HTML_DLG_EXTRA == dr) | 186 else if (HTMLDialog::HTML_DLG_EXTRA == dr) |
| 189 return EulaHTMLDialog::ACCEPTED_OPT_IN; | 187 return EulaHTMLDialog::ACCEPTED_OPT_IN; |
| 190 else | 188 else |
| 191 return EulaHTMLDialog::REJECTED; | 189 return EulaHTMLDialog::REJECTED; |
| 192 } | 190 } |
| 193 | 191 |
| 194 } // namespace installer | 192 } // namespace installer |
| OLD | NEW |