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

Side by Side Diff: chrome/browser/ui/toolbar/toolbar_model.h

Issue 233623002: Shows the info bubble when the location bar icon is clicked in the origin chip. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addresses nits from groby@. Created 6 years, 7 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
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 CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Returns whether the URL for the current navigation entry should be 90 // Returns whether the URL for the current navigation entry should be
91 // in the location bar. 91 // in the location bar.
92 virtual bool ShouldDisplayURL() const = 0; 92 virtual bool ShouldDisplayURL() const = 0;
93 93
94 // Returns true if a call to GetText() would return an empty string instead of 94 // Returns true if a call to GetText() would return an empty string instead of
95 // the URL that would have otherwise been displayed because the host/origin is 95 // the URL that would have otherwise been displayed because the host/origin is
96 // instead being displayed in the origin chip. This returns false when we 96 // instead being displayed in the origin chip. This returns false when we
97 // wouldn't have displayed a URL to begin with (e.g. for the NTP). 97 // wouldn't have displayed a URL to begin with (e.g. for the NTP).
98 virtual bool WouldOmitURLDueToOriginChip() const = 0; 98 virtual bool WouldOmitURLDueToOriginChip() const = 0;
99 99
100 // Returns true if the origin should be shown based on the current state of
101 // the ToolbarModel.
102 virtual bool ShouldShowOriginChip() const = 0;
Peter Kasting 2014/05/05 22:39:04 Make this non-virtual and eliminate the test_toolb
macourteau 2014/05/08 21:35:55 Done.
103
100 // Whether the text in the omnibox is currently being edited. 104 // Whether the text in the omnibox is currently being edited.
101 void set_input_in_progress(bool input_in_progress) { 105 void set_input_in_progress(bool input_in_progress) {
102 input_in_progress_ = input_in_progress; 106 input_in_progress_ = input_in_progress;
103 } 107 }
104 bool input_in_progress() const { return input_in_progress_; } 108 bool input_in_progress() const { return input_in_progress_; }
105 109
106 // Whether the origin chip should be enabled. 110 // Whether the origin chip should be enabled.
107 void set_origin_chip_enabled(bool enabled) { 111 void set_origin_chip_enabled(bool enabled) {
108 origin_chip_enabled_ = enabled; 112 origin_chip_enabled_ = enabled;
109 } 113 }
(...skipping 14 matching lines...) Expand all
124 128
125 private: 129 private:
126 bool input_in_progress_; 130 bool input_in_progress_;
127 bool origin_chip_enabled_; 131 bool origin_chip_enabled_;
128 bool url_replacement_enabled_; 132 bool url_replacement_enabled_;
129 133
130 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); 134 DISALLOW_COPY_AND_ASSIGN(ToolbarModel);
131 }; 135 };
132 136
133 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ 137 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698