| 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" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" | 13 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" |
| 14 #include "chrome/browser/autocomplete/autocomplete_match.h" | 14 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 15 #include "chrome/common/metrics/proto/omnibox_event.pb.h" | 15 #include "chrome/common/metrics/proto/omnibox_event.pb.h" |
| 16 #include "chrome/common/omnibox_focus_state.h" |
| 16 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
| 17 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 18 #include "ui/base/window_open_disposition.h" | 19 #include "ui/base/window_open_disposition.h" |
| 19 #include "ui/gfx/native_widget_types.h" | 20 #include "ui/gfx/native_widget_types.h" |
| 20 | 21 |
| 21 class AutocompleteController; | 22 class AutocompleteController; |
| 22 class AutocompleteResult; | 23 class AutocompleteResult; |
| 23 struct InstantSuggestion; | 24 struct InstantSuggestion; |
| 24 class OmniboxCurrentPageDelegate; | 25 class OmniboxCurrentPageDelegate; |
| 25 class OmniboxEditController; | 26 class OmniboxEditController; |
| 26 class OmniboxPopupModel; | 27 class OmniboxPopupModel; |
| 27 class OmniboxView; | 28 class OmniboxView; |
| 28 class Profile; | 29 class Profile; |
| 29 | 30 |
| 30 namespace gfx { | 31 namespace gfx { |
| 31 class Image; | 32 class Image; |
| 32 class Rect; | 33 class Rect; |
| 33 } | 34 } |
| 34 | 35 |
| 35 // Omnibox focus state. | |
| 36 enum OmniboxFocusState { | |
| 37 // Not focused. | |
| 38 OMNIBOX_FOCUS_NONE, | |
| 39 | |
| 40 // Visibly focused. | |
| 41 OMNIBOX_FOCUS_VISIBLE, | |
| 42 | |
| 43 // Invisibly focused, i.e. focused with a hidden caret. | |
| 44 OMNIBOX_FOCUS_INVISIBLE, | |
| 45 }; | |
| 46 | |
| 47 // Reasons why the Omnibox focus state could change. | 36 // Reasons why the Omnibox focus state could change. |
| 48 enum OmniboxFocusChangeReason { | 37 enum OmniboxFocusChangeReason { |
| 49 // Includes any explicit changes to focus. (e.g. user clicking to change | 38 // Includes any explicit changes to focus. (e.g. user clicking to change |
| 50 // focus, user tabbing to change focus, any explicit calls to SetFocus, | 39 // focus, user tabbing to change focus, any explicit calls to SetFocus, |
| 51 // etc.) | 40 // etc.) |
| 52 OMNIBOX_FOCUS_CHANGE_EXPLICIT, | 41 OMNIBOX_FOCUS_CHANGE_EXPLICIT, |
| 53 | 42 |
| 54 // Focus changed to restore state from a tab the user switched to. | 43 // Focus changed to restore state from a tab the user switched to. |
| 55 OMNIBOX_FOCUS_CHANGE_TAB_SWITCH, | 44 OMNIBOX_FOCUS_CHANGE_TAB_SWITCH, |
| 56 | 45 |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 // an exact keyword match. If this is true then keyword mode will be | 538 // an exact keyword match. If this is true then keyword mode will be |
| 550 // triggered automatically if the input is "<keyword> <search string>". We | 539 // triggered automatically if the input is "<keyword> <search string>". We |
| 551 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. | 540 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. |
| 552 // This has no effect if we're already in keyword mode. | 541 // This has no effect if we're already in keyword mode. |
| 553 bool allow_exact_keyword_match_; | 542 bool allow_exact_keyword_match_; |
| 554 | 543 |
| 555 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); | 544 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); |
| 556 }; | 545 }; |
| 557 | 546 |
| 558 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ | 547 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ |
| OLD | NEW |