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

Side by Side Diff: chrome/renderer/searchbox/searchbox.h

Issue 10918289: Instant extended API: Make arrow up/down work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hackiness noted Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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_RENDERER_SEARCHBOX_SEARCHBOX_H_ 5 #ifndef CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 6 #define CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 25 matching lines...) Expand all
36 36
37 const string16& query() const { return query_; } 37 const string16& query() const { return query_; }
38 bool verbatim() const { return verbatim_; } 38 bool verbatim() const { return verbatim_; }
39 size_t selection_start() const { return selection_start_; } 39 size_t selection_start() const { return selection_start_; }
40 size_t selection_end() const { return selection_end_; } 40 size_t selection_end() const { return selection_end_; }
41 int results_base() const { return results_base_; } 41 int results_base() const { return results_base_; }
42 gfx::Rect GetRect(); 42 gfx::Rect GetRect();
43 const std::vector<InstantAutocompleteResult>& autocomplete_results() const { 43 const std::vector<InstantAutocompleteResult>& autocomplete_results() const {
44 return autocomplete_results_; 44 return autocomplete_results_;
45 } 45 }
46 int key_code() const { return key_code_; }
47 46
48 private: 47 private:
49 // RenderViewObserver implementation. 48 // RenderViewObserver implementation.
50 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 49 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
51 50
52 void OnChange(const string16& query, 51 void OnChange(const string16& query,
53 bool verbatim, 52 bool verbatim,
54 size_t selection_start, 53 size_t selection_start,
55 size_t selection_end); 54 size_t selection_end);
56 void OnSubmit(const string16& query); 55 void OnSubmit(const string16& query);
57 void OnCancel(const string16& query); 56 void OnCancel(const string16& query);
58 void OnResize(const gfx::Rect& bounds); 57 void OnResize(const gfx::Rect& bounds);
59 void OnDetermineIfPageSupportsInstant(); 58 void OnDetermineIfPageSupportsInstant();
60 void OnAutocompleteResults( 59 void OnAutocompleteResults(
61 const std::vector<InstantAutocompleteResult>& results); 60 const std::vector<InstantAutocompleteResult>& results);
62 void OnKeyPress(int key_code); 61 void OnUpOrDownKeyPressed(int count);
63 62
64 // Sets the searchbox values to their initial value. 63 // Sets the searchbox values to their initial value.
65 void Reset(); 64 void Reset();
66 65
67 string16 query_; 66 string16 query_;
68 bool verbatim_; 67 bool verbatim_;
69 size_t selection_start_; 68 size_t selection_start_;
70 size_t selection_end_; 69 size_t selection_end_;
71 int results_base_; 70 int results_base_;
72 gfx::Rect rect_; 71 gfx::Rect rect_;
73 std::vector<InstantAutocompleteResult> autocomplete_results_; 72 std::vector<InstantAutocompleteResult> autocomplete_results_;
74 int key_code_;
75 73
76 DISALLOW_COPY_AND_ASSIGN(SearchBox); 74 DISALLOW_COPY_AND_ASSIGN(SearchBox);
77 }; 75 };
78 76
79 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_ 77 #endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698