summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc16
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.h6
2 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 14ea78f..b39c6f0 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -1,10 +1,12 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/autocomplete/autocomplete_edit_view_win.h"
#include <locale>
+#include <richedit.h>
+#include <textserv.h>
#include "app/clipboard/clipboard.h"
#include "app/clipboard/scoped_clipboard_writer.h"
@@ -48,6 +50,7 @@
#include "views/widget/widget.h"
#pragma comment(lib, "oleacc.lib") // Needed for accessibility support.
+#pragma comment(lib, "riched20.lib") // Needed for the richedit control.
///////////////////////////////////////////////////////////////////////////////
// AutocompleteEditModel
@@ -405,8 +408,11 @@ AutocompleteEditViewWin::AutocompleteEditViewWin(
drop_highlight_position_(-1),
background_color_(0),
scheme_security_level_(ToolbarModel::NORMAL),
- text_object_model_(NULL),
- riched20dll_handle_(LoadLibrary(L"riched20.dll")) {
+ text_object_model_(NULL) {
+ // Dummy call to a function exported by riched20.dll to ensure it sets up an
+ // import dependency on the dll.
+ CreateTextServices(NULL, NULL, NULL);
+
model_->SetPopupModel(popup_view_->GetModel());
saved_selection_for_focus_change_.cpMin = -1;
@@ -475,10 +481,6 @@ AutocompleteEditViewWin::~AutocompleteEditViewWin() {
// released, it becomes garbage.
text_object_model_->Release();
- // We're now done with this library, so release our reference to it so it can
- // be unloaded if possible.
- FreeLibrary(riched20dll_handle_);
-
// We balance our reference count and unpatch when the last instance has
// been destroyed. This prevents us from relying on the AtExit or static
// destructor sequence to do our unpatching, which is generally fragile.
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
index 393ef0a..4db0ea6 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -488,10 +488,6 @@ class AutocompleteEditViewWin
// Instance of accessibility information and handling.
mutable ScopedComPtr<IAccessible> autocomplete_accessibility_;
- // We explicitly retain a handle to this library so it never gets unloaded out
- // from underneath us.
- HMODULE riched20dll_handle_;
-
DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewWin);
};