DescriptionAbstract ToolbarModelImpl dependencies on //content.
Add following methods to ToolbarModelImpl to abstract the dependencies
on content::WebContents.
- GetURL(): fetches the URL to display, if it exists, or return false,
- ShouldDisplayURL(): returns whether the URL should be displayed in the
toolbar or not (embedder specific)
- GetSecurityLevel(): returns the security level of the underlying page,
independently of the editing status of the toolbar,
- GetSearchTerms(): extracts the search terms for the current page from
the content::WebContents (implementation depends on the embedder),
- GetCertificate(): returns the certificate for the current page, if
any, otherwise returns null.
Inject the constant content::kMaxURLDisplayChars through the constructor
of ToolbarModelImpl to allow sharing the code with iOS that cannot depend
on content.
TBR=dzhioev@chromium.org
BUG=582921
Committed: https://crrev.com/4d623d703112ab992b4d48ca98d21ed78f850c68
Cr-Commit-Position: refs/heads/master@{#373317}
Patch Set 1 #Patch Set 2 : Rebase (fix compilation on chromeos) #Patch Set 3 : Rebase #Patch Set 4 : Fix compilation on Mac #
Total comments: 15
Patch Set 5 : Address comments #Messages
Total messages: 16 (9 generated)
|