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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // 2) The user is composing a text with an IME | 312 // 2) The user is composing a text with an IME |
313 bool OnAfterPossibleChange(const std::wstring& new_text, | 313 bool OnAfterPossibleChange(const std::wstring& new_text, |
314 bool selection_differs, | 314 bool selection_differs, |
315 bool text_differs, | 315 bool text_differs, |
316 bool just_deleted_text, | 316 bool just_deleted_text, |
317 bool allow_keyword_ui_change); | 317 bool allow_keyword_ui_change); |
318 | 318 |
319 // Invoked when the popup is going to change its bounds to |bounds|. | 319 // Invoked when the popup is going to change its bounds to |bounds|. |
320 void PopupBoundsChangedTo(const gfx::Rect& bounds); | 320 void PopupBoundsChangedTo(const gfx::Rect& bounds); |
321 | 321 |
| 322 // Called when the popup is closed. |
| 323 void OnPopupClosed(); |
| 324 |
322 private: | 325 private: |
323 enum PasteState { | 326 enum PasteState { |
324 NONE, // Most recent edit was not a paste. | 327 NONE, // Most recent edit was not a paste. |
325 PASTING, // In the middle of doing a paste. We need this intermediate | 328 PASTING, // In the middle of doing a paste. We need this intermediate |
326 // state because OnPaste() does the actual detection of | 329 // state because OnPaste() does the actual detection of |
327 // paste, but OnAfterPossibleChange() has to update the | 330 // paste, but OnAfterPossibleChange() has to update the |
328 // paste state for every edit. If OnPaste() set the state | 331 // paste state for every edit. If OnPaste() set the state |
329 // directly to PASTED, OnAfterPossibleChange() wouldn't know | 332 // directly to PASTED, OnAfterPossibleChange() wouldn't know |
330 // whether that represented the current edit or a past one. | 333 // whether that represented the current edit or a past one. |
331 PASTED, // Most recent edit was a paste. | 334 PASTED, // Most recent edit was a paste. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 mutable GURL paste_and_go_url_; | 480 mutable GURL paste_and_go_url_; |
478 mutable PageTransition::Type paste_and_go_transition_; | 481 mutable PageTransition::Type paste_and_go_transition_; |
479 mutable GURL paste_and_go_alternate_nav_url_; | 482 mutable GURL paste_and_go_alternate_nav_url_; |
480 | 483 |
481 Profile* profile_; | 484 Profile* profile_; |
482 | 485 |
483 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); | 486 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); |
484 }; | 487 }; |
485 | 488 |
486 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 489 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
OLD | NEW |