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_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Returns "<organization_name> [<country>]". | 39 // Returns "<organization_name> [<country>]". |
40 static base::string16 GetEVCertName(const net::X509Certificate& cert); | 40 static base::string16 GetEVCertName(const net::X509Certificate& cert); |
41 | 41 |
42 private: | 42 private: |
43 // ToolbarModel: | 43 // ToolbarModel: |
44 virtual base::string16 GetText() const OVERRIDE; | 44 virtual base::string16 GetText() const OVERRIDE; |
45 virtual base::string16 GetFormattedURL() const OVERRIDE; | 45 virtual base::string16 GetFormattedURL() const OVERRIDE; |
46 virtual base::string16 GetCorpusNameForMobile() const OVERRIDE; | 46 virtual base::string16 GetCorpusNameForMobile() const OVERRIDE; |
47 virtual GURL GetURL() const OVERRIDE; | 47 virtual GURL GetURL() const OVERRIDE; |
48 virtual bool WouldOmitURLDueToOriginChip() const OVERRIDE; | |
49 virtual bool WouldPerformSearchTermReplacement( | 48 virtual bool WouldPerformSearchTermReplacement( |
50 bool ignore_editing) const OVERRIDE; | 49 bool ignore_editing) const OVERRIDE; |
51 virtual SecurityLevel GetSecurityLevel(bool ignore_editing) const OVERRIDE; | 50 virtual SecurityLevel GetSecurityLevel(bool ignore_editing) const OVERRIDE; |
52 virtual int GetIcon() const OVERRIDE; | 51 virtual int GetIcon() const OVERRIDE; |
53 virtual int GetIconForSecurityLevel(SecurityLevel level) const OVERRIDE; | 52 virtual int GetIconForSecurityLevel(SecurityLevel level) const OVERRIDE; |
54 virtual base::string16 GetEVCertName() const OVERRIDE; | 53 virtual base::string16 GetEVCertName() const OVERRIDE; |
55 virtual bool ShouldDisplayURL() const OVERRIDE; | 54 virtual bool ShouldDisplayURL() const OVERRIDE; |
| 55 virtual bool WouldOmitURLDueToOriginChip() const OVERRIDE; |
56 | 56 |
57 // Returns the navigation controller used to retrieve the navigation entry | 57 // Returns the navigation controller used to retrieve the navigation entry |
58 // from which the states are retrieved. | 58 // from which the states are retrieved. |
59 // If this returns NULL, default values are used. | 59 // If this returns NULL, default values are used. |
60 content::NavigationController* GetNavigationController() const; | 60 content::NavigationController* GetNavigationController() const; |
61 | 61 |
62 // Helper method to extract the profile from the navigation controller. | 62 // Helper method to extract the profile from the navigation controller. |
63 Profile* GetProfile() const; | 63 Profile* GetProfile() const; |
64 | 64 |
65 // Returns search terms as in chrome::GetSearchTerms() if such terms should | 65 // Returns search terms as in chrome::GetSearchTerms() if such terms should |
66 // appear in the omnibox (i.e. the page is sufficiently secure, search term | 66 // appear in the omnibox (i.e. the page is sufficiently secure, search term |
67 // replacement is enabled, editing is not in progress, etc.). If | 67 // replacement is enabled, editing is not in progress, etc.). If |
68 // |ignore_editing| is true, the "editing not in progress" check is skipped. | 68 // |ignore_editing| is true, the "editing not in progress" check is skipped. |
69 base::string16 GetSearchTerms(bool ignore_editing) const; | 69 base::string16 GetSearchTerms(bool ignore_editing) const; |
70 | 70 |
71 ToolbarModelDelegate* delegate_; | 71 ToolbarModelDelegate* delegate_; |
72 | 72 |
73 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarModelImpl); | 73 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolbarModelImpl); |
74 }; | 74 }; |
75 | 75 |
76 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ | 76 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_IMPL_H_ |
OLD | NEW |