Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: ios/web/navigation/navigation_item_impl.h

Issue 678483003: Adds web::NavigationItemImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/navigation/navigation_item_impl.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_
6 #define IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string16.h"
11 #include "ios/web/public/favicon_status.h"
12 #include "ios/web/public/navigation_item.h"
13 #include "ios/web/public/referrer.h"
14 #include "ios/web/public/ssl_status.h"
15 #include "url/gurl.h"
16
17 namespace web {
18
19 // Implementation of NavigationItem.
20 class NavigationItemImpl : public web::NavigationItem {
21 public:
22 // Creates a default NavigationItemImpl.
23 NavigationItemImpl();
24 virtual ~NavigationItemImpl();
25
26 // NavigationItem implementation:
27 virtual int GetUniqueID() const override;
28 virtual void SetURL(const GURL& url) override;
29 virtual const GURL& GetURL() const override;
30 virtual void SetReferrer(const web::Referrer& referrer) override;
31 virtual const web::Referrer& GetReferrer() const override;
32 virtual void SetVirtualURL(const GURL& url) override;
33 virtual const GURL& GetVirtualURL() const override;
34 virtual void SetTitle(const base::string16& title) override;
35 virtual const base::string16& GetTitle() const override;
36 virtual void SetPageID(int page_id) override;
37 virtual int32 GetPageID() const override;
38 virtual const base::string16& GetTitleForDisplay(
39 const std::string& languages) const override;
40 virtual void SetTransitionType(ui::PageTransition transition_type) override;
41 virtual ui::PageTransition GetTransitionType() const override;
42 virtual const FaviconStatus& GetFavicon() const override;
43 virtual FaviconStatus& GetFavicon() override;
44 virtual const SSLStatus& GetSSL() const override;
45 virtual SSLStatus& GetSSL() override;
46 virtual void SetTimestamp(base::Time timestamp) override;
47 virtual base::Time GetTimestamp() const override;
48
49 private:
50 int unique_id_;
51 GURL url_;
52 Referrer referrer_;
53 GURL virtual_url_;
54 base::string16 title_;
55 int32 page_id_;
56 ui::PageTransition transition_type_;
57 FaviconStatus favicon_;
58 SSLStatus ssl_;
59 base::Time timestamp_;
60
61 // This is a cached version of the result of GetTitleForDisplay. When the URL,
62 // virtual URL, or title is set, this should be cleared to force a refresh.
63 mutable base::string16 cached_display_title_;
64
65 // Copy and assignment is explicitly allowed for this class.
66 };
67
68 } // namespace web
69
70 #endif // IOS_WEB_NAVIGATION_NAVIGATION_ITEM_IMPL_H_
OLDNEW
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/navigation/navigation_item_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698