| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <atlbase.h> | 9 #include <atlbase.h> |
| 10 #include <atlapp.h> | 10 #include <atlapp.h> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 virtual void OnBeforePossibleChange() OVERRIDE; | 135 virtual void OnBeforePossibleChange() OVERRIDE; |
| 136 virtual bool OnAfterPossibleChange() OVERRIDE; | 136 virtual bool OnAfterPossibleChange() OVERRIDE; |
| 137 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 137 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 138 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; | 138 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; |
| 139 virtual CommandUpdater* GetCommandUpdater() OVERRIDE; | 139 virtual CommandUpdater* GetCommandUpdater() OVERRIDE; |
| 140 virtual void SetInstantSuggestion(const string16& suggestion, | 140 virtual void SetInstantSuggestion(const string16& suggestion, |
| 141 bool animate_to_complete) OVERRIDE; | 141 bool animate_to_complete) OVERRIDE; |
| 142 virtual int TextWidth() const OVERRIDE; | 142 virtual int TextWidth() const OVERRIDE; |
| 143 virtual string16 GetInstantSuggestion() const OVERRIDE; | 143 virtual string16 GetInstantSuggestion() const OVERRIDE; |
| 144 virtual bool IsImeComposing() const OVERRIDE; | 144 virtual bool IsImeComposing() const OVERRIDE; |
| 145 virtual bool ShouldHideAutocompletePopup() const OVERRIDE; |
| 145 | 146 |
| 146 virtual views::View* AddToView(views::View* parent) OVERRIDE; | 147 virtual views::View* AddToView(views::View* parent) OVERRIDE; |
| 147 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; | 148 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; |
| 148 | 149 |
| 149 int GetPopupMaxYCoordinate(); | 150 int GetPopupMaxYCoordinate(); |
| 150 | 151 |
| 151 // Exposes custom IAccessible implementation to the overall MSAA hierarchy. | 152 // Exposes custom IAccessible implementation to the overall MSAA hierarchy. |
| 152 IAccessible* GetIAccessible(); | 153 IAccessible* GetIAccessible(); |
| 153 | 154 |
| 154 void SetDropHighlightPosition(int position); | 155 void SetDropHighlightPosition(int position); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 179 void HandleExternalMsg(UINT msg, UINT flags, const CPoint& screen_point); | 180 void HandleExternalMsg(UINT msg, UINT flags, const CPoint& screen_point); |
| 180 | 181 |
| 181 // CWindowImpl | 182 // CWindowImpl |
| 182 BEGIN_MSG_MAP(AutocompleteEdit) | 183 BEGIN_MSG_MAP(AutocompleteEdit) |
| 183 MSG_WM_CHAR(OnChar) | 184 MSG_WM_CHAR(OnChar) |
| 184 MSG_WM_CONTEXTMENU(OnContextMenu) | 185 MSG_WM_CONTEXTMENU(OnContextMenu) |
| 185 MSG_WM_COPY(OnCopy) | 186 MSG_WM_COPY(OnCopy) |
| 186 MSG_WM_CUT(OnCut) | 187 MSG_WM_CUT(OnCut) |
| 187 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject) | 188 MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject) |
| 188 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition) | 189 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition) |
| 190 MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeNotify) |
| 189 MSG_WM_KEYDOWN(OnKeyDown) | 191 MSG_WM_KEYDOWN(OnKeyDown) |
| 190 MSG_WM_KEYUP(OnKeyUp) | 192 MSG_WM_KEYUP(OnKeyUp) |
| 191 MSG_WM_KILLFOCUS(OnKillFocus) | 193 MSG_WM_KILLFOCUS(OnKillFocus) |
| 192 MSG_WM_LBUTTONDBLCLK(OnLButtonDblClk) | 194 MSG_WM_LBUTTONDBLCLK(OnLButtonDblClk) |
| 193 MSG_WM_LBUTTONDOWN(OnLButtonDown) | 195 MSG_WM_LBUTTONDOWN(OnLButtonDown) |
| 194 MSG_WM_LBUTTONUP(OnLButtonUp) | 196 MSG_WM_LBUTTONUP(OnLButtonUp) |
| 195 MSG_WM_MBUTTONDBLCLK(OnMButtonDblClk) | 197 MSG_WM_MBUTTONDBLCLK(OnMButtonDblClk) |
| 196 MSG_WM_MBUTTONDOWN(OnMButtonDown) | 198 MSG_WM_MBUTTONDOWN(OnMButtonDown) |
| 197 MSG_WM_MBUTTONUP(OnMButtonUp) | 199 MSG_WM_MBUTTONUP(OnMButtonUp) |
| 198 MSG_WM_MOUSEACTIVATE(OnMouseActivate) | 200 MSG_WM_MOUSEACTIVATE(OnMouseActivate) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 // Returns true if |edit_text| starting at |current_pos| is "://". | 279 // Returns true if |edit_text| starting at |current_pos| is "://". |
| 278 static bool SchemeEnd(LPTSTR edit_text, int current_pos, int length); | 280 static bool SchemeEnd(LPTSTR edit_text, int current_pos, int length); |
| 279 | 281 |
| 280 // Message handlers | 282 // Message handlers |
| 281 void OnChar(TCHAR ch, UINT repeat_count, UINT flags); | 283 void OnChar(TCHAR ch, UINT repeat_count, UINT flags); |
| 282 void OnContextMenu(HWND window, const CPoint& point); | 284 void OnContextMenu(HWND window, const CPoint& point); |
| 283 void OnCopy(); | 285 void OnCopy(); |
| 284 void OnCut(); | 286 void OnCut(); |
| 285 LRESULT OnGetObject(UINT uMsg, WPARAM wparam, LPARAM lparam); | 287 LRESULT OnGetObject(UINT uMsg, WPARAM wparam, LPARAM lparam); |
| 286 LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam); | 288 LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam); |
| 289 LRESULT OnImeNotify(UINT message, WPARAM wparam, LPARAM lparam); |
| 287 void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags); | 290 void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags); |
| 288 void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags); | 291 void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags); |
| 289 void OnKillFocus(HWND focus_wnd); | 292 void OnKillFocus(HWND focus_wnd); |
| 290 void OnLButtonDblClk(UINT keys, const CPoint& point); | 293 void OnLButtonDblClk(UINT keys, const CPoint& point); |
| 291 void OnLButtonDown(UINT keys, const CPoint& point); | 294 void OnLButtonDown(UINT keys, const CPoint& point); |
| 292 void OnLButtonUp(UINT keys, const CPoint& point); | 295 void OnLButtonUp(UINT keys, const CPoint& point); |
| 293 void OnMButtonDblClk(UINT keys, const CPoint& point); | 296 void OnMButtonDblClk(UINT keys, const CPoint& point); |
| 294 void OnMButtonDown(UINT keys, const CPoint& point); | 297 void OnMButtonDown(UINT keys, const CPoint& point); |
| 295 void OnMButtonUp(UINT keys, const CPoint& point); | 298 void OnMButtonUp(UINT keys, const CPoint& point); |
| 296 LRESULT OnMouseActivate(HWND window, UINT hit_test, UINT mouse_message); | 299 LRESULT OnMouseActivate(HWND window, UINT hit_test, UINT mouse_message); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 bool in_drag_; | 526 bool in_drag_; |
| 524 | 527 |
| 525 // If true indicates we've run a drag and drop session. This is used to | 528 // If true indicates we've run a drag and drop session. This is used to |
| 526 // avoid starting two drag and drop sessions if the drag is canceled while | 529 // avoid starting two drag and drop sessions if the drag is canceled while |
| 527 // the mouse is still down. | 530 // the mouse is still down. |
| 528 bool initiated_drag_; | 531 bool initiated_drag_; |
| 529 | 532 |
| 530 // Position of the drop highlight. If this is -1, there is no drop highlight. | 533 // Position of the drop highlight. If this is -1, there is no drop highlight. |
| 531 int drop_highlight_position_; | 534 int drop_highlight_position_; |
| 532 | 535 |
| 536 // True if the IME candidate window is open. |
| 537 bool ime_candidate_window_open_; |
| 538 |
| 533 // Security UI-related data. | 539 // Security UI-related data. |
| 534 COLORREF background_color_; | 540 COLORREF background_color_; |
| 535 ToolbarModel::SecurityLevel security_level_; | 541 ToolbarModel::SecurityLevel security_level_; |
| 536 | 542 |
| 537 // This interface is useful for accessing the CRichEditCtrl at a low level. | 543 // This interface is useful for accessing the CRichEditCtrl at a low level. |
| 538 mutable ITextDocument* text_object_model_; | 544 mutable ITextDocument* text_object_model_; |
| 539 | 545 |
| 540 // This contains the scheme char start and stop indexes that should be | 546 // This contains the scheme char start and stop indexes that should be |
| 541 // stricken-out when displaying an insecure scheme. | 547 // stricken-out when displaying an insecure scheme. |
| 542 url_parse::Component insecure_scheme_component_; | 548 url_parse::Component insecure_scheme_component_; |
| 543 | 549 |
| 544 // Instance of accessibility information and handling. | 550 // Instance of accessibility information and handling. |
| 545 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_; | 551 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_; |
| 546 | 552 |
| 547 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); | 553 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); |
| 548 }; | 554 }; |
| 549 | 555 |
| 550 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ | 556 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ |
| OLD | NEW |