| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // may be false when the user is composing a text with an IME. | 280 // may be false when the user is composing a text with an IME. |
| 281 bool OnAfterPossibleChange(const string16& old_text, | 281 bool OnAfterPossibleChange(const string16& old_text, |
| 282 const string16& new_text, | 282 const string16& new_text, |
| 283 size_t selection_start, | 283 size_t selection_start, |
| 284 size_t selection_end, | 284 size_t selection_end, |
| 285 bool selection_differs, | 285 bool selection_differs, |
| 286 bool text_differs, | 286 bool text_differs, |
| 287 bool just_deleted_text, | 287 bool just_deleted_text, |
| 288 bool allow_keyword_ui_change); | 288 bool allow_keyword_ui_change); |
| 289 | 289 |
| 290 // Invoked when the popup is going to change its bounds to |bounds|. | 290 // Invoked when the popup has changed its bounds to |bounds|. |bounds| here |
| 291 void PopupBoundsChangedTo(const gfx::Rect& bounds); | 291 // is in screen coordinates. |
| 292 void OnPopupBoundsChanged(const gfx::Rect& bounds); |
| 292 | 293 |
| 293 private: | 294 private: |
| 294 enum PasteState { | 295 enum PasteState { |
| 295 NONE, // Most recent edit was not a paste. | 296 NONE, // Most recent edit was not a paste. |
| 296 PASTING, // In the middle of doing a paste. We need this intermediate | 297 PASTING, // In the middle of doing a paste. We need this intermediate |
| 297 // state because OnPaste() does the actual detection of | 298 // state because OnPaste() does the actual detection of |
| 298 // paste, but OnAfterPossibleChange() has to update the | 299 // paste, but OnAfterPossibleChange() has to update the |
| 299 // paste state for every edit. If OnPaste() set the state | 300 // paste state for every edit. If OnPaste() set the state |
| 300 // directly to PASTED, OnAfterPossibleChange() wouldn't know | 301 // directly to PASTED, OnAfterPossibleChange() wouldn't know |
| 301 // whether that represented the current edit or a past one. | 302 // whether that represented the current edit or a past one. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 // an exact keyword match. If this is true then keyword mode will be | 522 // an exact keyword match. If this is true then keyword mode will be |
| 522 // triggered automatically if the input is "<keyword> <search string>". We | 523 // triggered automatically if the input is "<keyword> <search string>". We |
| 523 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 524 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
| 524 // This has no effect if we're already in keyword mode. | 525 // This has no effect if we're already in keyword mode. |
| 525 bool allow_exact_keyword_match_; | 526 bool allow_exact_keyword_match_; |
| 526 | 527 |
| 527 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 528 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
| 528 }; | 529 }; |
| 529 | 530 |
| 530 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 531 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| OLD | NEW |