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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.cc

Issue 11235023: Redesign: Remove TsfEventRouter interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@ominifix
Patch Set: Patch for review Created 8 years, 2 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
Index: chrome/browser/ui/views/omnibox/omnibox_view_win.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index 299c08f6f883f7d4c3bca327ef8558c49235f828..71ca5dc46fa8e2a70953a283e1f9d202addeed3e 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -480,7 +480,10 @@ OmniboxViewWin::OmniboxViewWin(OmniboxEditController* controller,
chrome::search::IsInstantExtendedAPIEnabled(parent_view_->profile()),
ToolbarModel::NONE, LocationBarView::BACKGROUND))),
security_level_(ToolbarModel::NONE),
- text_object_model_(NULL) {
+ text_object_model_(NULL),
+ ALLOW_THIS_IN_INITIALIZER_LIST(
+ tsf_event_router_(base::win::IsTsfAwareRequired() ?
+ new ui::TsfEventRouter(this) : NULL)) {
if (!loaded_library_module_)
loaded_library_module_ = LoadLibrary(kRichEditDLLName);
@@ -541,9 +544,6 @@ OmniboxViewWin::OmniboxViewWin(OmniboxEditController* controller,
// the edit control will invoke RevokeDragDrop when it's being destroyed, so
// we don't have to do so.
scoped_refptr<EditDropTarget> drop_target(new EditDropTarget(this));
-
- if (base::win::IsTsfAwareRequired())
- tsf_event_router_ = ui::TsfEventRouter::Create();
}
}
@@ -556,7 +556,7 @@ OmniboxViewWin::~OmniboxViewWin() {
text_object_model_->Release();
if (tsf_event_router_)
- tsf_event_router_->SetManager(NULL, NULL);
+ tsf_event_router_->SetManager(NULL);
// We balance our reference count and unpatch when the last instance has
// been destroyed. This prevents us from relying on the AtExit or static
@@ -1626,7 +1626,7 @@ void OmniboxViewWin::OnKillFocus(HWND focus_wnd) {
PlaceCaretAt(0);
if (tsf_event_router_)
- tsf_event_router_->SetManager(NULL, NULL);
+ tsf_event_router_->SetManager(NULL);
}
void OmniboxViewWin::OnLButtonDblClk(UINT keys, const CPoint& point) {
@@ -1961,8 +1961,7 @@ void OmniboxViewWin::OnSetFocus(HWND focus_wnd) {
// Document manager created by RichEdit can be obtained only after
// WM_SETFOCUS event is handled.
tsf_event_router_->SetManager(
- ui::TsfBridge::GetInstance()->GetThreadManager(),
- this);
+ ui::TsfBridge::GetInstance()->GetThreadManager());
SetMsgHandled(true);
}
}

Powered by Google App Engine
This is Rietveld 408576698