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

Unified Diff: chrome_frame/ready_mode/internal/ready_prompt_window.cc

Issue 6298014: Replace one unfortunate hack with a somewhat better one. The included atlctrl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/ready_mode/internal/ready_prompt_window.cc
===================================================================
--- chrome_frame/ready_mode/internal/ready_prompt_window.cc (revision 72366)
+++ chrome_frame/ready_mode/internal/ready_prompt_window.cc (working copy)
@@ -5,17 +5,8 @@
#include "chrome_frame/ready_mode/internal/ready_prompt_window.h"
#include <atlctrls.h>
-#include <Shellapi.h> // Must appear before atlctrlx.h
+#include <Shellapi.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 "base/compiler_specific.h"
#include "base/win/scoped_bstr.h"
#include "base/win/scoped_comptr.h"
@@ -24,6 +15,13 @@
#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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698