OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CHROME_TOOLBAR_MODEL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_DELEGATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/toolbar/toolbar_model_delegate.h" | 9 #include "components/toolbar/toolbar_model_delegate.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class ChromeToolbarModelDelegate : public ToolbarModelDelegate { | 21 class ChromeToolbarModelDelegate : public ToolbarModelDelegate { |
22 public: | 22 public: |
23 // Returns active WebContents. | 23 // Returns active WebContents. |
24 virtual content::WebContents* GetActiveWebContents() const = 0; | 24 virtual content::WebContents* GetActiveWebContents() const = 0; |
25 | 25 |
26 protected: | 26 protected: |
27 ChromeToolbarModelDelegate(); | 27 ChromeToolbarModelDelegate(); |
28 ~ChromeToolbarModelDelegate() override; | 28 ~ChromeToolbarModelDelegate() override; |
29 | 29 |
30 private: | 30 private: |
31 // ToolbarModelDelegate implementation: | |
32 std::string GetAcceptLanguages() const override; | |
33 base::string16 FormattedStringWithEquivalentMeaning( | 31 base::string16 FormattedStringWithEquivalentMeaning( |
34 const GURL& url, | 32 const GURL& url, |
35 const base::string16& formatted_url) const override; | 33 const base::string16& formatted_url) const override; |
36 bool GetURL(GURL* url) const override; | 34 bool GetURL(GURL* url) const override; |
37 bool ShouldDisplayURL() const override; | 35 bool ShouldDisplayURL() const override; |
38 SecurityLevel GetSecurityLevel() const override; | 36 SecurityLevel GetSecurityLevel() const override; |
39 base::string16 GetSearchTerms(SecurityLevel security_level) const override; | 37 base::string16 GetSearchTerms(SecurityLevel security_level) const override; |
40 scoped_refptr<net::X509Certificate> GetCertificate() const override; | 38 scoped_refptr<net::X509Certificate> GetCertificate() const override; |
41 | 39 |
42 // Returns the navigation controller used to retrieve the navigation entry | 40 // Returns the navigation controller used to retrieve the navigation entry |
43 // from which the states are retrieved. If this returns null, default values | 41 // from which the states are retrieved. If this returns null, default values |
44 // are used. | 42 // are used. |
45 content::NavigationController* GetNavigationController() const; | 43 content::NavigationController* GetNavigationController() const; |
46 | 44 |
47 // Helper method to extract the navigation entry from the navigation | 45 // Helper method to extract the navigation entry from the navigation |
48 // controller. | 46 // controller. |
49 content::NavigationEntry* GetNavigationEntry() const; | 47 content::NavigationEntry* GetNavigationEntry() const; |
50 | 48 |
51 // Helper method to extract the profile from the navigation controller. | 49 // Helper method to extract the profile from the navigation controller. |
52 Profile* GetProfile() const; | 50 Profile* GetProfile() const; |
53 | 51 |
54 DISALLOW_COPY_AND_ASSIGN(ChromeToolbarModelDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(ChromeToolbarModelDelegate); |
55 }; | 53 }; |
56 | 54 |
57 #endif // CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_DELEGATE_H_ | 55 #endif // CHROME_BROWSER_UI_TOOLBAR_CHROME_TOOLBAR_MODEL_DELEGATE_H_ |
OLD | NEW |