OLD | NEW |
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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // Return the character encoding of the page. | 176 // Return the character encoding of the page. |
177 virtual const std::string& GetEncoding() const = 0; | 177 virtual const std::string& GetEncoding() const = 0; |
178 | 178 |
179 // True if this is a secure page which displayed insecure content. | 179 // True if this is a secure page which displayed insecure content. |
180 virtual bool DisplayedInsecureContent() const = 0; | 180 virtual bool DisplayedInsecureContent() const = 0; |
181 | 181 |
182 // Internal state ------------------------------------------------------------ | 182 // Internal state ------------------------------------------------------------ |
183 | 183 |
184 // This flag indicates whether the WebContents is currently being | 184 // This flag indicates whether the WebContents is currently being |
185 // screenshotted. | 185 // screenshotted. |
186 virtual void SetCapturingContents(bool cap) = 0; | 186 virtual void SetCapturingContents(bool cap) = 0; |
187 | 187 |
188 // Indicates whether this tab should be considered crashed. The setter will | 188 // Indicates whether this tab should be considered crashed. The setter will |
189 // also notify the delegate when the flag is changed. | 189 // also notify the delegate when the flag is changed. |
190 virtual bool IsCrashed() const = 0; | 190 virtual bool IsCrashed() const = 0; |
191 virtual void SetIsCrashed(base::TerminationStatus status, int error_code) = 0; | 191 virtual void SetIsCrashed(base::TerminationStatus status, int error_code) = 0; |
192 | 192 |
193 virtual base::TerminationStatus GetCrashedStatus() const = 0; | 193 virtual base::TerminationStatus GetCrashedStatus() const = 0; |
194 | 194 |
195 // Whether the tab is in the process of being destroyed. | 195 // Whether the tab is in the process of being destroyed. |
196 // Added as a tentative work-around for focus related bug #4633. This allows | 196 virtual bool IsBeingDestroyed() const = 0; |
197 // us not to store focus when a tab is being closed. | |
198 virtual bool IsBeingDestroyed() const = 0; | |
199 | 197 |
200 // Convenience method for notifying the delegate of a navigation state | 198 // Convenience method for notifying the delegate of a navigation state |
201 // change. See InvalidateType enum. | 199 // change. See InvalidateType enum. |
202 virtual void NotifyNavigationStateChanged(unsigned changed_flags) = 0; | 200 virtual void NotifyNavigationStateChanged(unsigned changed_flags) = 0; |
203 | 201 |
204 // Get the last time that the WebContents was made visible with WasShown() | 202 // Get the last time that the WebContents was made visible with WasShown() |
205 virtual base::TimeTicks GetLastSelectedTime() const = 0; | 203 virtual base::TimeTicks GetLastSelectedTime() const = 0; |
206 | 204 |
207 // Invoked when the WebContents becomes shown/hidden. | 205 // Invoked when the WebContents becomes shown/hidden. |
208 virtual void WasShown() = 0; | 206 virtual void WasShown() = 0; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 // Focuses the location bar. | 387 // Focuses the location bar. |
390 virtual void SetFocusToLocationBar(bool select_all) = 0; | 388 virtual void SetFocusToLocationBar(bool select_all) = 0; |
391 | 389 |
392 // Does this have an opener associated with it? | 390 // Does this have an opener associated with it? |
393 virtual bool HasOpener() const = 0; | 391 virtual bool HasOpener() const = 0; |
394 }; | 392 }; |
395 | 393 |
396 } // namespace content | 394 } // namespace content |
397 | 395 |
398 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 396 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |