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

Side by Side Diff: components/toolbar/toolbar_model.h

Issue 1578193002: Remove ChromeToolbarModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DEPS file 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 unified diff | Download patch
« no previous file with comments | « components/toolbar/DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ 5 #ifndef COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_
6 #define COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ 6 #define COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "components/security_state/security_state_model.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 16
16 namespace gfx { 17 namespace gfx {
17 enum class VectorIconId; 18 enum class VectorIconId;
18 } 19 }
19 20
20 namespace net { 21 namespace net {
21 class X509Certificate; 22 class X509Certificate;
22 } 23 }
23 24
(...skipping 29 matching lines...) Expand all
53 54
54 // Returns the URL of the current navigation entry. 55 // Returns the URL of the current navigation entry.
55 virtual GURL GetURL() const = 0; 56 virtual GURL GetURL() const = 0;
56 57
57 // Returns true if a call to GetText() would successfully replace the URL 58 // Returns true if a call to GetText() would successfully replace the URL
58 // with search terms. If |ignore_editing| is true, the result reflects the 59 // with search terms. If |ignore_editing| is true, the result reflects the
59 // underlying state of the page without regard to any user edits that may be 60 // underlying state of the page without regard to any user edits that may be
60 // in progress in the omnibox. 61 // in progress in the omnibox.
61 virtual bool WouldPerformSearchTermReplacement(bool ignore_editing) const = 0; 62 virtual bool WouldPerformSearchTermReplacement(bool ignore_editing) const = 0;
62 63
64 // Returns the security level that the toolbar should display. If
65 // |ignore_editing| is true, the result reflects the underlying state of the
66 // page without regard to any user edits that may be in progress in the
67 // omnibox.
68 virtual security_state::SecurityStateModel::SecurityLevel GetSecurityLevel(
69 bool ignore_editing) const = 0;
70
63 // Returns true if a call to GetText() would return something other than the 71 // Returns true if a call to GetText() would return something other than the
64 // URL because of search term replacement. 72 // URL because of search term replacement.
65 bool WouldReplaceURL() const; 73 bool WouldReplaceURL() const;
66 74
67 // Returns the resource_id of the icon to show to the left of the address, 75 // Returns the resource_id of the icon to show to the left of the address,
68 // based on the current URL. When search term replacement is active, this 76 // based on the current URL. When search term replacement is active, this
69 // returns a search icon. This doesn't cover specialized icons while the 77 // returns a search icon. This doesn't cover specialized icons while the
70 // user is editing; see OmniboxView::GetIcon(). 78 // user is editing; see OmniboxView::GetIcon().
71 virtual int GetIcon() const = 0; 79 virtual int GetIcon() const = 0;
72 80
(...skipping 26 matching lines...) Expand all
99 ToolbarModel(); 107 ToolbarModel();
100 108
101 private: 109 private:
102 bool input_in_progress_; 110 bool input_in_progress_;
103 bool url_replacement_enabled_; 111 bool url_replacement_enabled_;
104 112
105 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); 113 DISALLOW_COPY_AND_ASSIGN(ToolbarModel);
106 }; 114 };
107 115
108 #endif // COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ 116 #endif // COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_
OLDNEW
« no previous file with comments | « components/toolbar/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698