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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // may be false when the user is composing a text with an IME. | 311 // may be false when the user is composing a text with an IME. |
312 bool OnAfterPossibleChange(const string16& old_text, | 312 bool OnAfterPossibleChange(const string16& old_text, |
313 const string16& new_text, | 313 const string16& new_text, |
314 size_t selection_start, | 314 size_t selection_start, |
315 size_t selection_end, | 315 size_t selection_end, |
316 bool selection_differs, | 316 bool selection_differs, |
317 bool text_differs, | 317 bool text_differs, |
318 bool just_deleted_text, | 318 bool just_deleted_text, |
319 bool allow_keyword_ui_change); | 319 bool allow_keyword_ui_change); |
320 | 320 |
321 // Invoked when the popup is going to change its bounds to |bounds|. | 321 // Invoked when the popup has changed its bounds to |bounds|. |bounds| here |
322 void PopupBoundsChangedTo(const gfx::Rect& bounds); | 322 // is in screen coordinates. |
| 323 void OnPopupBoundsChanged(const gfx::Rect& bounds); |
323 | 324 |
324 private: | 325 private: |
325 enum PasteState { | 326 enum PasteState { |
326 NONE, // Most recent edit was not a paste. | 327 NONE, // Most recent edit was not a paste. |
327 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 |
328 // state because OnPaste() does the actual detection of | 329 // state because OnPaste() does the actual detection of |
329 // paste, but OnAfterPossibleChange() has to update the | 330 // paste, but OnAfterPossibleChange() has to update the |
330 // paste state for every edit. If OnPaste() set the state | 331 // paste state for every edit. If OnPaste() set the state |
331 // directly to PASTED, OnAfterPossibleChange() wouldn't know | 332 // directly to PASTED, OnAfterPossibleChange() wouldn't know |
332 // whether that represented the current edit or a past one. | 333 // whether that represented the current edit or a past one. |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 // an exact keyword match. If this is true then keyword mode will be | 560 // an exact keyword match. If this is true then keyword mode will be |
560 // triggered automatically if the input is "<keyword> <search string>". We | 561 // triggered automatically if the input is "<keyword> <search string>". We |
561 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 562 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
562 // This has no effect if we're already in keyword mode. | 563 // This has no effect if we're already in keyword mode. |
563 bool allow_exact_keyword_match_; | 564 bool allow_exact_keyword_match_; |
564 | 565 |
565 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 566 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
566 }; | 567 }; |
567 | 568 |
568 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 569 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
OLD | NEW |