OLD | NEW |
1 // Copyright (c) 2011 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 <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 15 matching lines...) Expand all Loading... |
26 InstantCompleteBehavior behavior); | 26 InstantCompleteBehavior behavior); |
27 | 27 |
28 const string16& value() const { return value_; } | 28 const string16& value() const { return value_; } |
29 bool verbatim() const { return verbatim_; } | 29 bool verbatim() const { return verbatim_; } |
30 uint32 selection_start() const { return selection_start_; } | 30 uint32 selection_start() const { return selection_start_; } |
31 uint32 selection_end() const { return selection_end_; } | 31 uint32 selection_end() const { return selection_end_; } |
32 gfx::Rect GetRect(); | 32 gfx::Rect GetRect(); |
33 | 33 |
34 private: | 34 private: |
35 // RenderViewObserver implementation. | 35 // RenderViewObserver implementation. |
36 virtual bool OnMessageReceived(const IPC::Message& message); | 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
37 | 37 |
38 void OnChange(const string16& value, | 38 void OnChange(const string16& value, |
39 bool verbatim, | 39 bool verbatim, |
40 int selection_start, | 40 int selection_start, |
41 int selection_end); | 41 int selection_end); |
42 void OnSubmit(const string16& value, bool verbatim); | 42 void OnSubmit(const string16& value, bool verbatim); |
43 void OnCancel(); | 43 void OnCancel(); |
44 void OnResize(const gfx::Rect& bounds); | 44 void OnResize(const gfx::Rect& bounds); |
45 void OnDetermineIfPageSupportsInstant(const string16& value, | 45 void OnDetermineIfPageSupportsInstant(const string16& value, |
46 bool verbatim, | 46 bool verbatim, |
47 int selection_start, | 47 int selection_start, |
48 int selection_end); | 48 int selection_end); |
49 | 49 |
50 // Sets the searchbox values to their initial value. | 50 // Sets the searchbox values to their initial value. |
51 void Reset(); | 51 void Reset(); |
52 | 52 |
53 string16 value_; | 53 string16 value_; |
54 bool verbatim_; | 54 bool verbatim_; |
55 uint32 selection_start_; | 55 uint32 selection_start_; |
56 uint32 selection_end_; | 56 uint32 selection_end_; |
57 gfx::Rect rect_; | 57 gfx::Rect rect_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(SearchBox); | 59 DISALLOW_COPY_AND_ASSIGN(SearchBox); |
60 }; | 60 }; |
61 | 61 |
62 #endif // CHROME_RENDERER_SEARCHBOX_H_ | 62 #endif // CHROME_RENDERER_SEARCHBOX_H_ |
OLD | NEW |