OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TAB_CONTENTS_MATCH_PREVIEW_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_MATCH_PREVIEW_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_MATCH_PREVIEW_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_MATCH_PREVIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // TabContents the match is being shown for. | 77 // TabContents the match is being shown for. |
78 TabContents* tab_contents() const { return tab_contents_; } | 78 TabContents* tab_contents() const { return tab_contents_; } |
79 | 79 |
80 // The preview TabContents; may be null. | 80 // The preview TabContents; may be null. |
81 TabContents* preview_contents() const { return preview_contents_.get(); } | 81 TabContents* preview_contents() const { return preview_contents_.get(); } |
82 | 82 |
83 // Returns true if the preview TabContents is active. In some situations this | 83 // Returns true if the preview TabContents is active. In some situations this |
84 // may return false yet preview_contents() returns non-NULL. | 84 // may return false yet preview_contents() returns non-NULL. |
85 bool is_active() const { return is_active_; } | 85 bool is_active() const { return is_active_; } |
86 | 86 |
| 87 // Returns the transition type of the last AutocompleteMatch passed to Update. |
| 88 PageTransition::Type last_transition_type() const { |
| 89 return last_transition_type_; |
| 90 } |
| 91 |
87 const GURL& url() const { return url_; } | 92 const GURL& url() const { return url_; } |
88 | 93 |
89 private: | 94 private: |
90 class FrameLoadObserver; | 95 class FrameLoadObserver; |
91 class PaintObserverImpl; | 96 class PaintObserverImpl; |
92 class TabContentsDelegateImpl; | 97 class TabContentsDelegateImpl; |
93 | 98 |
94 // Invoked when the page wants to update the suggested text. If |user_text_| | 99 // Invoked when the page wants to update the suggested text. If |user_text_| |
95 // starts with |suggested_text|, then the delegate is notified of the change, | 100 // starts with |suggested_text|, then the delegate is notified of the change, |
96 // which results in updating the omnibox. | 101 // which results in updating the omnibox. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 147 |
143 // If we're showing instant results this is the ID of the TemplateURL driving | 148 // If we're showing instant results this is the ID of the TemplateURL driving |
144 // the results. A value of 0 means there is no TemplateURL. | 149 // the results. A value of 0 means there is no TemplateURL. |
145 TemplateURLID template_url_id_; | 150 TemplateURLID template_url_id_; |
146 | 151 |
147 // See description above setter. | 152 // See description above setter. |
148 gfx::Rect omnibox_bounds_; | 153 gfx::Rect omnibox_bounds_; |
149 | 154 |
150 scoped_ptr<FrameLoadObserver> frame_load_observer_; | 155 scoped_ptr<FrameLoadObserver> frame_load_observer_; |
151 | 156 |
| 157 // See description above getter. |
| 158 PageTransition::Type last_transition_type_; |
| 159 |
152 DISALLOW_COPY_AND_ASSIGN(MatchPreview); | 160 DISALLOW_COPY_AND_ASSIGN(MatchPreview); |
153 }; | 161 }; |
154 | 162 |
155 #endif // CHROME_BROWSER_TAB_CONTENTS_MATCH_PREVIEW_H_ | 163 #endif // CHROME_BROWSER_TAB_CONTENTS_MATCH_PREVIEW_H_ |
OLD | NEW |