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_INSTANT_INSTANT_TAB_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_TAB_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_TAB_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_TAB_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // Calls through to methods of the same name on InstantClient. | 37 // Calls through to methods of the same name on InstantClient. |
38 void Update(const string16& text, | 38 void Update(const string16& text, |
39 size_t selection_start, | 39 size_t selection_start, |
40 size_t selection_end, | 40 size_t selection_end, |
41 bool verbatim); | 41 bool verbatim); |
42 void Submit(const string16& text); | 42 void Submit(const string16& text); |
43 void SendAutocompleteResults( | 43 void SendAutocompleteResults( |
44 const std::vector<InstantAutocompleteResult>& results); | 44 const std::vector<InstantAutocompleteResult>& results); |
45 void SetDisplayInstantResults(bool display_instant_results); | 45 void SetDisplayInstantResults(bool display_instant_results); |
46 void UpOrDownKeyPressed(int count); | 46 void UpOrDownKeyPressed(int count); |
| 47 void EscKeyPressed(); |
47 void SetMarginSize(int start, int end); | 48 void SetMarginSize(int start, int end); |
48 void InitializeFonts(); | 49 void InitializeFonts(); |
49 | 50 |
50 private: | 51 private: |
51 // Overridden from InstantClient::Delegate: | 52 // Overridden from InstantClient::Delegate: |
52 virtual void SetSuggestions( | 53 virtual void SetSuggestions( |
53 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; | 54 const std::vector<InstantSuggestion>& suggestions) OVERRIDE; |
54 virtual void InstantSupportDetermined(bool supports_instant) OVERRIDE; | 55 virtual void InstantSupportDetermined(bool supports_instant) OVERRIDE; |
55 virtual void ShowInstantPreview(InstantShownReason reason, | 56 virtual void ShowInstantPreview(InstantShownReason reason, |
56 int height, | 57 int height, |
57 InstantSizeUnits units) OVERRIDE; | 58 InstantSizeUnits units) OVERRIDE; |
58 virtual void StartCapturingKeyStrokes() OVERRIDE; | 59 virtual void StartCapturingKeyStrokes() OVERRIDE; |
59 virtual void StopCapturingKeyStrokes() OVERRIDE; | 60 virtual void StopCapturingKeyStrokes() OVERRIDE; |
60 virtual void RenderViewGone() OVERRIDE; | 61 virtual void RenderViewGone() OVERRIDE; |
61 virtual void AboutToNavigateMainFrame(const GURL& url) OVERRIDE; | 62 virtual void AboutToNavigateMainFrame(const GURL& url) OVERRIDE; |
62 virtual void NavigateToURL(const GURL& url, | 63 virtual void NavigateToURL(const GURL& url, |
63 content::PageTransition transition) OVERRIDE; | 64 content::PageTransition transition) OVERRIDE; |
64 virtual void RenderViewCreated() OVERRIDE; | 65 virtual void RenderViewCreated() OVERRIDE; |
65 | 66 |
66 InstantClient client_; | 67 InstantClient client_; |
67 InstantController* const controller_; | 68 InstantController* const controller_; |
68 content::WebContents* const contents_; | 69 content::WebContents* const contents_; |
69 bool supports_instant_; | 70 bool supports_instant_; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(InstantTab); | 72 DISALLOW_COPY_AND_ASSIGN(InstantTab); |
72 }; | 73 }; |
73 | 74 |
74 #endif // CHROME_BROWSER_INSTANT_INSTANT_TAB_H_ | 75 #endif // CHROME_BROWSER_INSTANT_INSTANT_TAB_H_ |
OLD | NEW |