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

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

Issue 200783003: [OriginChip] Add animations for the hiding and showing of the chip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 13 matching lines...) Expand all
24 // don't need two sets of security UI levels. SECURITY_STYLE_AUTHENTICATED 24 // don't need two sets of security UI levels. SECURITY_STYLE_AUTHENTICATED
25 // needs to be refined into three levels: warning, standard, and EV. 25 // needs to be refined into three levels: warning, standard, and EV.
26 enum SecurityLevel { 26 enum SecurityLevel {
27 #define DEFINE_TOOLBAR_MODEL_SECURITY_LEVEL(name,value) name = value, 27 #define DEFINE_TOOLBAR_MODEL_SECURITY_LEVEL(name,value) name = value,
28 #include "chrome/browser/ui/toolbar/toolbar_model_security_level_list.h" 28 #include "chrome/browser/ui/toolbar/toolbar_model_security_level_list.h"
29 #undef DEFINE_TOOLBAR_MODEL_SECURITY_LEVEL 29 #undef DEFINE_TOOLBAR_MODEL_SECURITY_LEVEL
30 }; 30 };
31 31
32 virtual ~ToolbarModel(); 32 virtual ~ToolbarModel();
33 33
34 // Returns the text for the current page's URL. This will have been formatted 34 // Returns the text to be displayed in the toolbar for the current page.
35 // for display to the user: 35 // The text is formatted in various ways:
36 // - Some characters may be unescaped.
37 // - The scheme and/or trailing slash may be dropped.
38 // - If the current page's URL is a search URL for the user's default search 36 // - If the current page's URL is a search URL for the user's default search
39 // engine, the query will be extracted and returned for display instead 37 // engine, the query will be extracted and returned for display instead
40 // of the URL. 38 // of the URL.
39 // - If the origin chip is enabled and visible, the text will be empty.
40 // - Otherwise, the text will contain the URL returned by GetFormattedURL().
41 virtual base::string16 GetText() const = 0; 41 virtual base::string16 GetText() const = 0;
42 42
43 // Returns a formatted URL for display in the toolbar. The formatting
44 // includes:
45 // - Some characters may be unescaped.
46 // - The scheme and/or trailing slash may be dropped.
47 virtual base::string16 GetFormattedURL() const = 0;
48
43 // Some search URLs bundle a special "corpus" param that we can extract and 49 // Some search URLs bundle a special "corpus" param that we can extract and
44 // display next to users' search terms in cases where we'd show the search 50 // display next to users' search terms in cases where we'd show the search
45 // terms instead of the URL anyway. For example, a Google image search might 51 // terms instead of the URL anyway. For example, a Google image search might
46 // show the corpus "Images:" plus a search string. This is only used on 52 // show the corpus "Images:" plus a search string. This is only used on
47 // mobile. 53 // mobile.
48 virtual base::string16 GetCorpusNameForMobile() const = 0; 54 virtual base::string16 GetCorpusNameForMobile() const = 0;
49 55
50 // Returns the URL of the current navigation entry. 56 // Returns the URL of the current navigation entry.
51 virtual GURL GetURL() const = 0; 57 virtual GURL GetURL() const = 0;
52 58
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 124
119 private: 125 private:
120 bool input_in_progress_; 126 bool input_in_progress_;
121 bool origin_chip_enabled_; 127 bool origin_chip_enabled_;
122 bool url_replacement_enabled_; 128 bool url_replacement_enabled_;
123 129
124 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); 130 DISALLOW_COPY_AND_ASSIGN(ToolbarModel);
125 }; 131 };
126 132
127 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ 133 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698