OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlapp.h> | 9 #include <atlapp.h> |
10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 bool notify_text_changed) OVERRIDE; | 90 bool notify_text_changed) OVERRIDE; |
91 virtual void SetForcedQuery() OVERRIDE; | 91 virtual void SetForcedQuery() OVERRIDE; |
92 virtual bool IsSelectAll() const OVERRIDE; | 92 virtual bool IsSelectAll() const OVERRIDE; |
93 virtual bool DeleteAtEndPressed() OVERRIDE; | 93 virtual bool DeleteAtEndPressed() OVERRIDE; |
94 virtual void GetSelectionBounds(string16::size_type* start, | 94 virtual void GetSelectionBounds(string16::size_type* start, |
95 string16::size_type* end) const OVERRIDE; | 95 string16::size_type* end) const OVERRIDE; |
96 virtual void SelectAll(bool reversed) OVERRIDE; | 96 virtual void SelectAll(bool reversed) OVERRIDE; |
97 virtual void RevertAll() OVERRIDE; | 97 virtual void RevertAll() OVERRIDE; |
98 virtual void UpdatePopup() OVERRIDE; | 98 virtual void UpdatePopup() OVERRIDE; |
99 virtual void SetFocus() OVERRIDE; | 99 virtual void SetFocus() OVERRIDE; |
| 100 virtual void SetInvisibleFocus() OVERRIDE; |
100 virtual void OnTemporaryTextMaybeChanged( | 101 virtual void OnTemporaryTextMaybeChanged( |
101 const string16& display_text, | 102 const string16& display_text, |
102 bool save_original_selection) OVERRIDE; | 103 bool save_original_selection) OVERRIDE; |
103 virtual bool OnInlineAutocompleteTextMaybeChanged( | 104 virtual bool OnInlineAutocompleteTextMaybeChanged( |
104 const string16& display_text, size_t user_text_length) OVERRIDE; | 105 const string16& display_text, size_t user_text_length) OVERRIDE; |
105 virtual void OnRevertTemporaryText() OVERRIDE; | 106 virtual void OnRevertTemporaryText() OVERRIDE; |
106 virtual void OnBeforePossibleChange() OVERRIDE; | 107 virtual void OnBeforePossibleChange() OVERRIDE; |
107 virtual bool OnAfterPossibleChange() OVERRIDE; | 108 virtual bool OnAfterPossibleChange() OVERRIDE; |
108 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 109 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
109 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; | 110 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 // triggerred no matter if the text is actually changed or not. | 388 // triggerred no matter if the text is actually changed or not. |
388 bool OnAfterPossibleChangeInternal(bool force_text_changed); | 389 bool OnAfterPossibleChangeInternal(bool force_text_changed); |
389 | 390 |
390 // Common implementation for performing a drop on the edit view. | 391 // Common implementation for performing a drop on the edit view. |
391 int OnPerformDropImpl(const ui::DropTargetEvent& event, bool in_drag); | 392 int OnPerformDropImpl(const ui::DropTargetEvent& event, bool in_drag); |
392 | 393 |
393 // Whether to show the menu item for copying the URL. | 394 // Whether to show the menu item for copying the URL. |
394 bool ShouldEnableCopyURL() const; | 395 bool ShouldEnableCopyURL() const; |
395 void CopyURL(); | 396 void CopyURL(); |
396 | 397 |
| 398 // Depending on the visibility of the focus stored in the OmniboxEditModel, |
| 399 // Sets the color of the caret to black or to the omnibox's background color, |
| 400 // effectively hiding it. |
| 401 void ApplyFocusVisibility(); |
| 402 |
| 403 // Height of the caret, used in the repainting of the caret in the omnibox. |
| 404 int caret_height_; |
| 405 |
397 // Handle of RichEdit dll. | 406 // Handle of RichEdit dll. |
398 static HMODULE loaded_library_module_; | 407 static HMODULE loaded_library_module_; |
399 | 408 |
400 scoped_ptr<OmniboxPopupView> popup_view_; | 409 scoped_ptr<OmniboxPopupView> popup_view_; |
401 | 410 |
402 // The parent view for the edit, used to align the popup and for | 411 // The parent view for the edit, used to align the popup and for |
403 // accessibility. | 412 // accessibility. |
404 LocationBarView* parent_view_; | 413 LocationBarView* parent_view_; |
405 | 414 |
406 // When true, the location bar view is read only and also is has a slightly | 415 // When true, the location bar view is read only and also is has a slightly |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // The native view host. | 523 // The native view host. |
515 views::NativeViewHost* native_view_host_; | 524 views::NativeViewHost* native_view_host_; |
516 | 525 |
517 // TSF related event router. | 526 // TSF related event router. |
518 scoped_ptr<ui::TSFEventRouter> tsf_event_router_; | 527 scoped_ptr<ui::TSFEventRouter> tsf_event_router_; |
519 | 528 |
520 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); | 529 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); |
521 }; | 530 }; |
522 | 531 |
523 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ | 532 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ |
OLD | NEW |