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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 virtual bool OnAfterPossibleChange() OVERRIDE; | 107 virtual bool OnAfterPossibleChange() OVERRIDE; |
108 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 108 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
109 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; | 109 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; |
110 virtual void SetInstantSuggestion(const string16& suggestion, | 110 virtual void SetInstantSuggestion(const string16& suggestion, |
111 bool animate_to_complete) OVERRIDE; | 111 bool animate_to_complete) OVERRIDE; |
112 virtual int TextWidth() const OVERRIDE; | 112 virtual int TextWidth() const OVERRIDE; |
113 virtual string16 GetInstantSuggestion() const OVERRIDE; | 113 virtual string16 GetInstantSuggestion() const OVERRIDE; |
114 virtual bool IsImeComposing() const OVERRIDE; | 114 virtual bool IsImeComposing() const OVERRIDE; |
115 virtual int GetMaxEditWidth(int entry_width) const OVERRIDE; | 115 virtual int GetMaxEditWidth(int entry_width) const OVERRIDE; |
116 virtual views::View* AddToView(views::View* parent) OVERRIDE; | 116 virtual views::View* AddToView(views::View* parent) OVERRIDE; |
117 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; | 117 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
118 virtual gfx::Font GetFont() OVERRIDE; | 118 virtual gfx::Font GetFont() OVERRIDE; |
119 virtual int WidthOfTextAfterCursor() OVERRIDE; | 119 virtual int WidthOfTextAfterCursor() OVERRIDE; |
120 | 120 |
121 int GetPopupMaxYCoordinate(); | 121 int GetPopupMaxYCoordinate(); |
122 | 122 |
123 void SetDropHighlightPosition(int position); | 123 void SetDropHighlightPosition(int position); |
124 int drop_highlight_position() const { return drop_highlight_position_; } | 124 int drop_highlight_position() const { return drop_highlight_position_; } |
125 | 125 |
126 // Returns true if a drag a drop session was initiated by this edit. | 126 // Returns true if a drag a drop session was initiated by this edit. |
127 bool in_drag() const { return in_drag_; } | 127 bool in_drag() const { return in_drag_; } |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 // Returns the width in pixels needed to display |text|. | 377 // Returns the width in pixels needed to display |text|. |
378 int WidthNeededToDisplay(const string16& text) const; | 378 int WidthNeededToDisplay(const string16& text) const; |
379 | 379 |
380 // Real implementation of OnAfterPossibleChange() method. | 380 // Real implementation of OnAfterPossibleChange() method. |
381 // If |force_text_changed| is true, then the text_changed code will always be | 381 // If |force_text_changed| is true, then the text_changed code will always be |
382 // triggerred no matter if the text is actually changed or not. | 382 // triggerred no matter if the text is actually changed or not. |
383 bool OnAfterPossibleChangeInternal(bool force_text_changed); | 383 bool OnAfterPossibleChangeInternal(bool force_text_changed); |
384 | 384 |
385 // Common implementation for performing a drop on the edit view. | 385 // Common implementation for performing a drop on the edit view. |
386 int OnPerformDropImpl(const views::DropTargetEvent& event, bool in_drag); | 386 int OnPerformDropImpl(const ui::DropTargetEvent& event, bool in_drag); |
387 | 387 |
388 scoped_ptr<OmniboxPopupView> popup_view_; | 388 scoped_ptr<OmniboxPopupView> popup_view_; |
389 | 389 |
390 // The parent view for the edit, used to align the popup and for | 390 // The parent view for the edit, used to align the popup and for |
391 // accessibility. | 391 // accessibility. |
392 LocationBarView* parent_view_; | 392 LocationBarView* parent_view_; |
393 | 393 |
394 // When true, the location bar view is read only and also is has a slightly | 394 // When true, the location bar view is read only and also is has a slightly |
395 // different presentation (font size / color). This is used for popups. | 395 // different presentation (font size / color). This is used for popups. |
396 bool popup_window_mode_; | 396 bool popup_window_mode_; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 // Instance of accessibility information and handling. | 499 // Instance of accessibility information and handling. |
500 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_; | 500 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_; |
501 | 501 |
502 // The native view host. | 502 // The native view host. |
503 views::NativeViewHost* native_view_host_; | 503 views::NativeViewHost* native_view_host_; |
504 | 504 |
505 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); | 505 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); |
506 }; | 506 }; |
507 | 507 |
508 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ | 508 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ |
OLD | NEW |