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

Unified Diff: chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h

Issue 1653013002: Abstract ToolbarModelImpl dependencies on //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1
Patch Set: Fix compilation on Mac Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
diff --git a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
index 61068d85a1caca576049d0887d279ac780e04ecb..e81504af5b6e1b02b049bdbee51fc8c586aa4098 100644
--- a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
+++ b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
@@ -10,27 +10,40 @@
class Profile;
namespace content {
+class NavigationEntry;
class NavigationController;
}
// Partial implementation of ToolbarModelDelegate using //chrome API.
class ChromeToolbarModelDelegate : public ToolbarModelDelegate {
public:
+ // Returns active WebContents.
+ virtual content::WebContents* GetActiveWebContents() const = 0;
+
+ protected:
+ ~ChromeToolbarModelDelegate() override;
+
+ private:
// ToolbarModelDelegate implementation:
std::string GetAcceptLanguages() const override;
base::string16 FormattedStringWithEquivalentMeaning(
const GURL& url,
const base::string16& formatted_url) const override;
+ bool GetURL(GURL* url) const override;
+ bool ShouldDisplayURL() const override;
+ SecurityLevel GetSecurityLevel() const override;
+ base::string16 GetSearchTerms(SecurityLevel security_level) const override;
+ scoped_refptr<net::X509Certificate> GetCertificate() const override;
- protected:
- ~ChromeToolbarModelDelegate() override;
-
- private:
// Returns the navigation controller used to retrive the navigation entry
// from which the states are retrieved. If this returns null, default values
// are used.
content::NavigationController* GetNavigationController() const;
+ // Helper method to extract the navigation entry from the navigation
+ // controller.
+ content::NavigationEntry* GetNavigationEntry() const;
+
// Helper method to extract the profile from the navigation controller.
Profile* GetProfile() const;
};

Powered by Google App Engine
This is Rietveld 408576698