| 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_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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // may be false when the user is composing a text with an IME. | 266 // may be false when the user is composing a text with an IME. |
| 267 bool OnAfterPossibleChange(const string16& old_text, | 267 bool OnAfterPossibleChange(const string16& old_text, |
| 268 const string16& new_text, | 268 const string16& new_text, |
| 269 size_t selection_start, | 269 size_t selection_start, |
| 270 size_t selection_end, | 270 size_t selection_end, |
| 271 bool selection_differs, | 271 bool selection_differs, |
| 272 bool text_differs, | 272 bool text_differs, |
| 273 bool just_deleted_text, | 273 bool just_deleted_text, |
| 274 bool allow_keyword_ui_change); | 274 bool allow_keyword_ui_change); |
| 275 | 275 |
| 276 // Invoked when the popup is going to change its bounds to |bounds|. | 276 // Invoked when the popup has changed its bounds to |bounds|. |
| 277 void PopupBoundsChangedTo(const gfx::Rect& bounds); | 277 void OnPopupBoundsChanged(const gfx::Rect& bounds); |
| 278 |
| 279 // Invoked when the omnibox has changed its bounds to |bounds|. |
| 280 void OnOmniboxBoundsChanged(const gfx::Rect& bounds); |
| 278 | 281 |
| 279 private: | 282 private: |
| 280 enum PasteState { | 283 enum PasteState { |
| 281 NONE, // Most recent edit was not a paste. | 284 NONE, // Most recent edit was not a paste. |
| 282 PASTING, // In the middle of doing a paste. We need this intermediate | 285 PASTING, // In the middle of doing a paste. We need this intermediate |
| 283 // state because OnPaste() does the actual detection of | 286 // state because OnPaste() does the actual detection of |
| 284 // paste, but OnAfterPossibleChange() has to update the | 287 // paste, but OnAfterPossibleChange() has to update the |
| 285 // paste state for every edit. If OnPaste() set the state | 288 // paste state for every edit. If OnPaste() set the state |
| 286 // directly to PASTED, OnAfterPossibleChange() wouldn't know | 289 // directly to PASTED, OnAfterPossibleChange() wouldn't know |
| 287 // whether that represented the current edit or a past one. | 290 // whether that represented the current edit or a past one. |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // an exact keyword match. If this is true then keyword mode will be | 507 // an exact keyword match. If this is true then keyword mode will be |
| 505 // triggered automatically if the input is "<keyword> <search string>". We | 508 // triggered automatically if the input is "<keyword> <search string>". We |
| 506 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 509 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
| 507 // This has no effect if we're already in keyword mode. | 510 // This has no effect if we're already in keyword mode. |
| 508 bool allow_exact_keyword_match_; | 511 bool allow_exact_keyword_match_; |
| 509 | 512 |
| 510 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 513 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
| 511 }; | 514 }; |
| 512 | 515 |
| 513 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 516 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| OLD | NEW |