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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 141013: Relanding focus manager refactoring (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser/autocomplete/autocomplete_edit_view_win.h" 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h"
6 6
7 #include <locale> 7 #include <locale>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 model_->on_paste_replacing_all(); 1603 model_->on_paste_replacing_all();
1604 // Force a Paste operation to trigger the text_changed code in 1604 // Force a Paste operation to trigger the text_changed code in
1605 // OnAfterPossibleChange(), even if identical contents are pasted into the 1605 // OnAfterPossibleChange(), even if identical contents are pasted into the
1606 // text box. 1606 // text box.
1607 text_before_change_.clear(); 1607 text_before_change_.clear();
1608 ReplaceSel(text.c_str(), true); 1608 ReplaceSel(text.c_str(), true);
1609 } 1609 }
1610 } 1610 }
1611 1611
1612 void AutocompleteEditViewWin::OnSetFocus(HWND focus_wnd) { 1612 void AutocompleteEditViewWin::OnSetFocus(HWND focus_wnd) {
1613 views::FocusManager* focus_manager = 1613 views::FocusManager* focus_manager = parent_view_->GetFocusManager();
1614 views::FocusManager::GetFocusManager(m_hWnd);
1615 if (focus_manager) { 1614 if (focus_manager) {
1616 // Notify the FocusManager that the focused view is now the location bar 1615 // Notify the FocusManager that the focused view is now the location bar
1617 // (our parent view). 1616 // (our parent view).
1618 focus_manager->SetFocusedView(parent_view_); 1617 focus_manager->SetFocusedView(parent_view_);
1619 } else { 1618 } else {
1620 NOTREACHED(); 1619 NOTREACHED();
1621 } 1620 }
1622 1621
1623 model_->OnSetFocus(GetKeyState(VK_CONTROL) < 0); 1622 model_->OnSetFocus(GetKeyState(VK_CONTROL) < 0);
1624 1623
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 context_menu_contents_->AddItemWithStringId(IDS_PASTE_AND_GO, 2339 context_menu_contents_->AddItemWithStringId(IDS_PASTE_AND_GO,
2341 IDS_PASTE_AND_GO); 2340 IDS_PASTE_AND_GO);
2342 context_menu_contents_->AddSeparator(); 2341 context_menu_contents_->AddSeparator();
2343 context_menu_contents_->AddItemWithStringId(IDS_SELECT_ALL, IDS_SELECT_ALL); 2342 context_menu_contents_->AddItemWithStringId(IDS_SELECT_ALL, IDS_SELECT_ALL);
2344 context_menu_contents_->AddSeparator(); 2343 context_menu_contents_->AddSeparator();
2345 context_menu_contents_->AddItemWithStringId(IDS_EDIT_SEARCH_ENGINES, 2344 context_menu_contents_->AddItemWithStringId(IDS_EDIT_SEARCH_ENGINES,
2346 IDS_EDIT_SEARCH_ENGINES); 2345 IDS_EDIT_SEARCH_ENGINES);
2347 } 2346 }
2348 context_menu_.reset(new views::Menu2(context_menu_contents_.get())); 2347 context_menu_.reset(new views::Menu2(context_menu_contents_.get()));
2349 } 2348 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698