OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef CHROME_RENDERER_SEARCHBOX_H_ |
6 #define CHROME_RENDERER_SEARCHBOX_H_ | 6 #define CHROME_RENDERER_SEARCHBOX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/string16.h" | 12 #include "base/string16.h" |
12 #include "chrome/common/instant_types.h" | 13 #include "chrome/common/instant_types.h" |
13 #include "content/renderer/render_view_observer.h" | 14 #include "content/renderer/render_view_observer.h" |
| 15 #include "content/renderer/render_view_observer_tracker.h" |
14 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
15 | 17 |
16 class SearchBox : public RenderViewObserver { | 18 class SearchBox : public RenderViewObserver, |
| 19 public RenderViewObserverTracker<SearchBox> { |
17 public: | 20 public: |
18 explicit SearchBox(RenderView* render_view); | 21 explicit SearchBox(RenderView* render_view); |
19 ~SearchBox(); | 22 ~SearchBox(); |
20 | 23 |
21 // Sends ViewHostMsg_SetSuggestions to the browser. | 24 // Sends ViewHostMsg_SetSuggestions to the browser. |
22 void SetSuggestions(const std::vector<std::string>& suggestions, | 25 void SetSuggestions(const std::vector<std::string>& suggestions, |
23 InstantCompleteBehavior behavior); | 26 InstantCompleteBehavior behavior); |
24 | 27 |
25 const string16& value() { return value_; } | 28 const string16& value() { return value_; } |
26 bool verbatim() { return verbatim_; } | 29 bool verbatim() { return verbatim_; } |
(...skipping 20 matching lines...) Expand all Loading... |
47 string16 value_; | 50 string16 value_; |
48 bool verbatim_; | 51 bool verbatim_; |
49 uint32 selection_start_; | 52 uint32 selection_start_; |
50 uint32 selection_end_; | 53 uint32 selection_end_; |
51 gfx::Rect rect_; | 54 gfx::Rect rect_; |
52 | 55 |
53 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 56 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
54 }; | 57 }; |
55 | 58 |
56 #endif // CHROME_RENDERER_SEARCHBOX_H_ | 59 #endif // CHROME_RENDERER_SEARCHBOX_H_ |
OLD | NEW |