OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_NAVIGATION_ENTRY_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/browser/tab_contents/security_style.h" | 11 #include "chrome/browser/tab_contents/security_style.h" |
12 #include "chrome/browser/tab_contents/site_instance.h" | 12 #include "chrome/browser/tab_contents/site_instance.h" |
13 #include "chrome/browser/tab_contents/tab_contents_type.h" | 13 #include "chrome/browser/tab_contents/tab_contents_type.h" |
14 #include "chrome/common/page_transition_types.h" | 14 #include "chrome/common/page_transition_types.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
17 #include "skia/include/SkBitmap.h" | 17 #include "skia/include/SkBitmap.h" |
| 18 #include "webkit/glue/feed.h" |
18 | 19 |
19 class NavigationController; | 20 class NavigationController; |
20 | 21 |
21 //////////////////////////////////////////////////////////////////////////////// | 22 //////////////////////////////////////////////////////////////////////////////// |
22 // | 23 // |
23 // NavigationEntry class | 24 // NavigationEntry class |
24 // | 25 // |
25 // A NavigationEntry is a data structure that captures all the information | 26 // A NavigationEntry is a data structure that captures all the information |
26 // required to recreate a browsing state. This includes some opaque binary | 27 // required to recreate a browsing state. This includes some opaque binary |
27 // state as provided by the TabContents as well as some clear text title and | 28 // state as provided by the TabContents as well as some clear text title and |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // | 317 // |
317 // The NavigationController corresponding to this entry must be given so we | 318 // The NavigationController corresponding to this entry must be given so we |
318 // can get the preferences so we can optionally format a URL for display. It | 319 // can get the preferences so we can optionally format a URL for display. It |
319 // may be NULL if you don't need proper URL formatting (e.g. unit tests). | 320 // may be NULL if you don't need proper URL formatting (e.g. unit tests). |
320 const string16& GetTitleForDisplay(const NavigationController* controller); | 321 const string16& GetTitleForDisplay(const NavigationController* controller); |
321 | 322 |
322 // Returns true if the current tab is in view source mode. This will be false | 323 // Returns true if the current tab is in view source mode. This will be false |
323 // if there is no navigation. | 324 // if there is no navigation. |
324 bool IsViewSourceMode() const; | 325 bool IsViewSourceMode() const; |
325 | 326 |
| 327 // Feed accessor. |
| 328 void set_feedlist(scoped_refptr<FeedList> feedlist) { |
| 329 feedlist_ = feedlist; |
| 330 } |
| 331 scoped_refptr<FeedList> feedlist() { |
| 332 return feedlist_; |
| 333 } |
| 334 |
326 // Tracking stuff ------------------------------------------------------------ | 335 // Tracking stuff ------------------------------------------------------------ |
327 | 336 |
328 // The transition type indicates what the user did to move to this page from | 337 // The transition type indicates what the user did to move to this page from |
329 // the previous page. | 338 // the previous page. |
330 void set_transition_type(PageTransition::Type transition_type) { | 339 void set_transition_type(PageTransition::Type transition_type) { |
331 transition_type_ = transition_type; | 340 transition_type_ = transition_type; |
332 } | 341 } |
333 PageTransition::Type transition_type() const { | 342 PageTransition::Type transition_type() const { |
334 return transition_type_; | 343 return transition_type_; |
335 } | 344 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 scoped_refptr<SiteInstance> site_instance_; | 395 scoped_refptr<SiteInstance> site_instance_; |
387 PageType page_type_; | 396 PageType page_type_; |
388 GURL url_; | 397 GURL url_; |
389 GURL referrer_; | 398 GURL referrer_; |
390 GURL display_url_; | 399 GURL display_url_; |
391 string16 title_; | 400 string16 title_; |
392 FaviconStatus favicon_; | 401 FaviconStatus favicon_; |
393 std::string content_state_; | 402 std::string content_state_; |
394 int32 page_id_; | 403 int32 page_id_; |
395 SSLStatus ssl_; | 404 SSLStatus ssl_; |
| 405 scoped_refptr<FeedList> feedlist_; |
396 PageTransition::Type transition_type_; | 406 PageTransition::Type transition_type_; |
397 GURL user_typed_url_; | 407 GURL user_typed_url_; |
398 bool has_post_data_; | 408 bool has_post_data_; |
399 bool restored_; | 409 bool restored_; |
400 | 410 |
401 // This is a cached version of the result of GetTitleForDisplay. It prevents | 411 // This is a cached version of the result of GetTitleForDisplay. It prevents |
402 // us from having to do URL formatting on the URL evey time the title is | 412 // us from having to do URL formatting on the URL evey time the title is |
403 // displayed. When the URL, display URL, or title is set, this should be | 413 // displayed. When the URL, display URL, or title is set, this should be |
404 // cleared to force a refresh. | 414 // cleared to force a refresh. |
405 string16 cached_display_title_; | 415 string16 cached_display_title_; |
406 | 416 |
407 // Copy and assignment is explicitly allowed for this class. | 417 // Copy and assignment is explicitly allowed for this class. |
408 }; | 418 }; |
409 | 419 |
410 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 420 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
OLD | NEW |