Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 14646034: Add onfocuschange to the Extended Search API, with associated isFocused attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent issues. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 class OmniboxEditController; 27 class OmniboxEditController;
28 class OmniboxPopupModel; 28 class OmniboxPopupModel;
29 class OmniboxView; 29 class OmniboxView;
30 class Profile; 30 class Profile;
31 31
32 namespace gfx { 32 namespace gfx {
33 class Image; 33 class Image;
34 class Rect; 34 class Rect;
35 } 35 }
36 36
37 // Reasons why the Omnibox focus state could change.
samarth 2013/05/15 19:05:53 This shouldn't need to change anymore, right?
Donn Denman 2013/05/20 23:48:14 True. However, I'd argue that it's better this wa
38 enum OmniboxFocusChangeReason {
39 // Includes any explicit changes to focus. (e.g. user clicking to change
40 // focus, user tabbing to change focus, any explicit calls to SetFocus,
41 // etc.)
42 OMNIBOX_FOCUS_CHANGE_EXPLICIT,
43
44 // Focus changed to restore state from a tab the user switched to.
45 OMNIBOX_FOCUS_CHANGE_TAB_SWITCH,
46
47 // Focus changed because user started typing. This only happens when focus
48 // state is INVISIBLE (and this results in a change to VISIBLE).
49 OMNIBOX_FOCUS_CHANGE_TYPING,
50 };
51
52 // Reasons why the Omnibox could change into keyword mode. 37 // Reasons why the Omnibox could change into keyword mode.
53 // These numeric values are used in UMA logs; do not change them. 38 // These numeric values are used in UMA logs; do not change them.
54 enum EnteredKeywordModeMethod { 39 enum EnteredKeywordModeMethod {
55 ENTERED_KEYWORD_MODE_VIA_TAB = 0, 40 ENTERED_KEYWORD_MODE_VIA_TAB = 0,
56 ENTERED_KEYWORD_MODE_VIA_SPACE_AT_END = 1, 41 ENTERED_KEYWORD_MODE_VIA_SPACE_AT_END = 1,
57 ENTERED_KEYWORD_MODE_VIA_SPACE_IN_MIDDLE = 2, 42 ENTERED_KEYWORD_MODE_VIA_SPACE_IN_MIDDLE = 2,
58 ENTERED_KEYWORD_MODE_NUM_ITEMS 43 ENTERED_KEYWORD_MODE_NUM_ITEMS
59 }; 44 };
60 45
61 class OmniboxEditModel { 46 class OmniboxEditModel {
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // an exact keyword match. If this is true then keyword mode will be 553 // an exact keyword match. If this is true then keyword mode will be
569 // triggered automatically if the input is "<keyword> <search string>". We 554 // triggered automatically if the input is "<keyword> <search string>". We
570 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true. 555 // allow this when CreatedKeywordSearchByInsertingSpaceInMiddle() is true.
571 // This has no effect if we're already in keyword mode. 556 // This has no effect if we're already in keyword mode.
572 bool allow_exact_keyword_match_; 557 bool allow_exact_keyword_match_;
573 558
574 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 559 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
575 }; 560 };
576 561
577 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 562 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.h » ('j') | chrome/browser/ui/search/instant_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698