OLD | NEW |
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/browser/autocomplete/autocomplete_edit_view_win.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <locale> | 8 #include <locale> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 GetSel(sel); | 693 GetSel(sel); |
694 model_->StartAutocomplete((sel.cpMax < GetTextLength()) || ime_composing); | 694 model_->StartAutocomplete((sel.cpMax < GetTextLength()) || ime_composing); |
695 } | 695 } |
696 | 696 |
697 void AutocompleteEditViewWin::ClosePopup() { | 697 void AutocompleteEditViewWin::ClosePopup() { |
698 popup_view_->GetModel()->StopAutocomplete(); | 698 popup_view_->GetModel()->StopAutocomplete(); |
699 } | 699 } |
700 | 700 |
701 void AutocompleteEditViewWin::SetFocus() { | 701 void AutocompleteEditViewWin::SetFocus() { |
702 ::SetFocus(m_hWnd); | 702 ::SetFocus(m_hWnd); |
703 parent_view_-> | |
704 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS, false); | |
705 } | 703 } |
706 | 704 |
707 IAccessible* AutocompleteEditViewWin::GetIAccessible() { | 705 IAccessible* AutocompleteEditViewWin::GetIAccessible() { |
708 if (!autocomplete_accessibility_) { | 706 if (!autocomplete_accessibility_) { |
709 CComObject<AutocompleteAccessibility>* accessibility = NULL; | 707 CComObject<AutocompleteAccessibility>* accessibility = NULL; |
710 if (!SUCCEEDED(CComObject<AutocompleteAccessibility>::CreateInstance( | 708 if (!SUCCEEDED(CComObject<AutocompleteAccessibility>::CreateInstance( |
711 &accessibility)) || !accessibility) | 709 &accessibility)) || !accessibility) |
712 return NULL; | 710 return NULL; |
713 | 711 |
714 // Wrap the created object in a smart pointer so it won't leak. | 712 // Wrap the created object in a smart pointer so it won't leak. |
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2477 void AutocompleteEditViewWin::TrackMousePosition(MouseButton button, | 2475 void AutocompleteEditViewWin::TrackMousePosition(MouseButton button, |
2478 const CPoint& point) { | 2476 const CPoint& point) { |
2479 if (gaining_focus_.get()) { | 2477 if (gaining_focus_.get()) { |
2480 // This click is giving us focus, so we need to track how much the mouse | 2478 // This click is giving us focus, so we need to track how much the mouse |
2481 // moves to see if it's a drag or just a click. Clicks should select all | 2479 // moves to see if it's a drag or just a click. Clicks should select all |
2482 // the text. | 2480 // the text. |
2483 tracking_click_[button] = true; | 2481 tracking_click_[button] = true; |
2484 click_point_[button] = point; | 2482 click_point_[button] = point; |
2485 } | 2483 } |
2486 } | 2484 } |
OLD | NEW |