summaryrefslogtreecommitdiffstats
path: root/chrome_frame/ready_mode/internal
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-25 16:44:13 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-25 16:44:13 +0000
commitce7937429f63f3d966346fcd973d720f268cd888 (patch)
tree5e4a90f69bb87faada249b9d5c0c3e7c164610f5 /chrome_frame/ready_mode/internal
parent0b885b533d86dc244362d124a0cf7f808564818e (diff)
downloadchromium_src-ce7937429f63f3d966346fcd973d720f268cd888.zip
chromium_src-ce7937429f63f3d966346fcd973d720f268cd888.tar.gz
chromium_src-ce7937429f63f3d966346fcd973d720f268cd888.tar.bz2
Replace one unfortunate hack with a somewhat better one. The included atlctrlx.h relies on min and max macros, which are generally bad and especially so in combination with STL.
BUG=None TEST=None Review URL: http://codereview.chromium.org/6298014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/ready_mode/internal')
-rw-r--r--chrome_frame/ready_mode/internal/ready_prompt_window.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/chrome_frame/ready_mode/internal/ready_prompt_window.cc b/chrome_frame/ready_mode/internal/ready_prompt_window.cc
index ddb51a9..2c1e3e5 100644
--- a/chrome_frame/ready_mode/internal/ready_prompt_window.cc
+++ b/chrome_frame/ready_mode/internal/ready_prompt_window.cc
@@ -5,16 +5,7 @@
#include "chrome_frame/ready_mode/internal/ready_prompt_window.h"
#include <atlctrls.h>
-#include <Shellapi.h> // Must appear before atlctrlx.h
-
-// These seem to be required by atlctrlx?
-template<class A>
-A min(A const& a, A const& b) { return a < b ? a : b; }
-
-template<class A>
-A max(A const& a, A const& b) { return a > b ? a : b; }
-
-#include <atlctrlx.h>
+#include <Shellapi.h>
#include "base/compiler_specific.h"
#include "base/win/scoped_bstr.h"
@@ -24,6 +15,13 @@ A max(A const& a, A const& b) { return a > b ? a : b; }
#include "chrome_frame/simple_resource_loader.h"
#include "grit/chromium_strings.h"
+// atlctrlx.h requires 'min' and 'max' macros, the definition of which conflicts
+// with STL headers. Hence we include them out of the order defined by style
+// guidelines. As a result you may not refer to std::min or std::max in this
+// file.
+#include <minmax.h> // NOLINT
+#include <atlctrlx.h> // NOLINT
+
ReadyPromptWindow::ReadyPromptWindow(
InfobarContent::Frame* frame, ReadyModeState* ready_mode_state,
UrlLauncher* url_launcher)