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

Side by Side Diff: chrome_frame/find_dialog.cc

Issue 10540003: Move guid generation from chrome/common/ to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: installer Created 8 years, 6 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 | « chrome/installer/gcapi/gcapi_reactivation_test.cc ('k') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/find_dialog.h" 5 #include "chrome_frame/find_dialog.h"
6 6
7 #include <richedit.h> 7 #include <richedit.h>
8 8
9 #include "base/guid.h"
9 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
10 #include "chrome/common/guid.h"
11 #include "chrome_frame/chrome_frame_automation.h" 11 #include "chrome_frame/chrome_frame_automation.h"
12 12
13 const int kMaxFindChars = 1024; 13 const int kMaxFindChars = 1024;
14 14
15 HHOOK CFFindDialog::msg_hook_ = NULL; 15 HHOOK CFFindDialog::msg_hook_ = NULL;
16 16
17 CFFindDialog::CFFindDialog() {} 17 CFFindDialog::CFFindDialog() {}
18 18
19 void CFFindDialog::Init(ChromeFrameAutomationClient* automation_client) { 19 void CFFindDialog::Init(ChromeFrameAutomationClient* automation_client) {
20 automation_client_ = automation_client; 20 automation_client_ = automation_client;
21 } 21 }
22 22
23 LRESULT CFFindDialog::OnDestroy(UINT msg, WPARAM wparam, LPARAM lparam, 23 LRESULT CFFindDialog::OnDestroy(UINT msg, WPARAM wparam, LPARAM lparam,
24 BOOL& handled) { 24 BOOL& handled) {
25 // In order to cancel the selection when the Find dialog is dismissed, we 25 // In order to cancel the selection when the Find dialog is dismissed, we
26 // do a fake search for a string that is unlikely to appear on the page. 26 // do a fake search for a string that is unlikely to appear on the page.
27 // TODO(robertshield): Change this to plumb through a StopFinding automation 27 // TODO(robertshield): Change this to plumb through a StopFinding automation
28 // message that triggers a ViewMsg_StopFinding. 28 // message that triggers a ViewMsg_StopFinding.
29 std::string guid(guid::GenerateGUID()); 29 std::string guid(base::GenerateGUID());
30 automation_client_->FindInPage(ASCIIToWide(guid), FWD, CASE_SENSITIVE, false); 30 automation_client_->FindInPage(ASCIIToWide(guid), FWD, CASE_SENSITIVE, false);
31 31
32 UninstallMessageHook(); 32 UninstallMessageHook();
33 return 0; 33 return 0;
34 } 34 }
35 35
36 LRESULT CFFindDialog::OnFind(WORD wNotifyCode, WORD wID, HWND hWndCtl, 36 LRESULT CFFindDialog::OnFind(WORD wNotifyCode, WORD wID, HWND hWndCtl,
37 BOOL& bHandled) { 37 BOOL& bHandled) {
38 string16 find_text(kMaxFindChars, L'\0'); 38 string16 find_text(kMaxFindChars, L'\0');
39 find_text.resize(GetDlgItemText(IDC_FIND_TEXT, &find_text[0], kMaxFindChars)); 39 find_text.resize(GetDlgItemText(IDC_FIND_TEXT, &find_text[0], kMaxFindChars));
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 bool CFFindDialog::UninstallMessageHook() { 113 bool CFFindDialog::UninstallMessageHook() {
114 DCHECK(msg_hook_ != NULL); 114 DCHECK(msg_hook_ != NULL);
115 BOOL result = ::UnhookWindowsHookEx(msg_hook_); 115 BOOL result = ::UnhookWindowsHookEx(msg_hook_);
116 DCHECK(result); 116 DCHECK(result);
117 msg_hook_ = NULL; 117 msg_hook_ = NULL;
118 118
119 return result != FALSE; 119 return result != FALSE;
120 } 120 }
OLDNEW
« no previous file with comments | « chrome/installer/gcapi/gcapi_reactivation_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698