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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 has changed its bounds to |bounds|. |bounds| here | 321 // Invoked when the popup has changed its bounds to |bounds|. |bounds| here |
322 // is in screen coordinates. | 322 // is in screen coordinates. |
323 void OnPopupBoundsChanged(const gfx::Rect& bounds); | 323 void OnPopupBoundsChanged(const gfx::Rect& bounds); |
324 | 324 |
325 private: | 325 private: |
| 326 friend class InstantTestBase; |
| 327 |
326 enum PasteState { | 328 enum PasteState { |
327 NONE, // Most recent edit was not a paste. | 329 NONE, // Most recent edit was not a paste. |
328 PASTING, // In the middle of doing a paste. We need this intermediate | 330 PASTING, // In the middle of doing a paste. We need this intermediate |
329 // state because OnPaste() does the actual detection of | 331 // state because OnPaste() does the actual detection of |
330 // paste, but OnAfterPossibleChange() has to update the | 332 // paste, but OnAfterPossibleChange() has to update the |
331 // paste state for every edit. If OnPaste() set the state | 333 // paste state for every edit. If OnPaste() set the state |
332 // directly to PASTED, OnAfterPossibleChange() wouldn't know | 334 // directly to PASTED, OnAfterPossibleChange() wouldn't know |
333 // whether that represented the current edit or a past one. | 335 // whether that represented the current edit or a past one. |
334 PASTED, // Most recent edit was a paste. | 336 PASTED, // Most recent edit was a paste. |
335 }; | 337 }; |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 // an exact keyword match. If this is true then keyword mode will be | 562 // an exact keyword match. If this is true then keyword mode will be |
561 // triggered automatically if the input is "<keyword> <search string>". We | 563 // triggered automatically if the input is "<keyword> <search string>". We |
562 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 564 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
563 // This has no effect if we're already in keyword mode. | 565 // This has no effect if we're already in keyword mode. |
564 bool allow_exact_keyword_match_; | 566 bool allow_exact_keyword_match_; |
565 | 567 |
566 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 568 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
567 }; | 569 }; |
568 | 570 |
569 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 571 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
OLD | NEW |