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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome_frame/ready_mode/internal/ready_prompt_window.h" 5 #include "chrome_frame/ready_mode/internal/ready_prompt_window.h"
6 6
7 #include <atlctrls.h> 7 #include <atlctrls.h>
8 #include <Shellapi.h> // Must appear before atlctrlx.h 8 #include <Shellapi.h>
9
10 // These seem to be required by atlctrlx?
11 template<class A>
12 A min(A const& a, A const& b) { return a < b ? a : b; }
13
14 template<class A>
15 A max(A const& a, A const& b) { return a > b ? a : b; }
16
17 #include <atlctrlx.h>
18 9
19 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
20 #include "base/win/scoped_bstr.h" 11 #include "base/win/scoped_bstr.h"
21 #include "base/win/scoped_comptr.h" 12 #include "base/win/scoped_comptr.h"
22 #include "chrome_frame/ready_mode/internal/ready_mode_state.h" 13 #include "chrome_frame/ready_mode/internal/ready_mode_state.h"
23 #include "chrome_frame/ready_mode/internal/url_launcher.h" 14 #include "chrome_frame/ready_mode/internal/url_launcher.h"
24 #include "chrome_frame/simple_resource_loader.h" 15 #include "chrome_frame/simple_resource_loader.h"
25 #include "grit/chromium_strings.h" 16 #include "grit/chromium_strings.h"
26 17
18 // atlctrlx.h requires 'min' and 'max' macros, the definition of which conflicts
19 // with STL headers. Hence we include them out of the order defined by style
20 // guidelines. As a result you may not refer to std::min or std::max in this
21 // file.
22 #include <minmax.h> // NOLINT
23 #include <atlctrlx.h> // NOLINT
24
27 ReadyPromptWindow::ReadyPromptWindow( 25 ReadyPromptWindow::ReadyPromptWindow(
28 InfobarContent::Frame* frame, ReadyModeState* ready_mode_state, 26 InfobarContent::Frame* frame, ReadyModeState* ready_mode_state,
29 UrlLauncher* url_launcher) 27 UrlLauncher* url_launcher)
30 : frame_(frame), 28 : frame_(frame),
31 ready_mode_state_(ready_mode_state), 29 ready_mode_state_(ready_mode_state),
32 url_launcher_(url_launcher), 30 url_launcher_(url_launcher),
33 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 31 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
34 } 32 }
35 ReadyPromptWindow::~ReadyPromptWindow() { 33 ReadyPromptWindow::~ReadyPromptWindow() {
36 } 34 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 LPNMHDR /*lParam*/, 101 LPNMHDR /*lParam*/,
104 BOOL& /*bHandled*/) { 102 BOOL& /*bHandled*/) {
105 url_launcher_->LaunchUrl(SimpleResourceLoader::Get( 103 url_launcher_->LaunchUrl(SimpleResourceLoader::Get(
106 IDS_CHROME_FRAME_READY_MODE_LEARN_MORE_URL)); 104 IDS_CHROME_FRAME_READY_MODE_LEARN_MORE_URL));
107 return 0; 105 return 0;
108 } 106 }
109 107
110 void ReadyPromptWindow::OnFinalMessage(HWND) { 108 void ReadyPromptWindow::OnFinalMessage(HWND) {
111 delete this; 109 delete this;
112 } 110 }
OLDNEW
« 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