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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.h

Issue 10915069: Add Copy URL option to Omnibox context menu when URL is replaced by Instant Extended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Try to parse the current text as a URL and colorize the components. 160 // Try to parse the current text as a URL and colorize the components.
161 virtual void EmphasizeURLComponents() OVERRIDE; 161 virtual void EmphasizeURLComponents() OVERRIDE;
162 162
163 // Update the field with |text| and set the selection. 163 // Update the field with |text| and set the selection.
164 void SetTextAndSelectedRange(const string16& text, 164 void SetTextAndSelectedRange(const string16& text,
165 const ui::Range& range); 165 const ui::Range& range);
166 166
167 // Returns the selected text. 167 // Returns the selected text.
168 string16 GetSelectedText() const; 168 string16 GetSelectedText() const;
169 169
170 // Copy the URL instead of the text in the textfield into clipboard.
171 void CopyURL();
172
170 views::Textfield* textfield_; 173 views::Textfield* textfield_;
171 174
172 // When true, the location bar view is read only and also is has a slightly 175 // When true, the location bar view is read only and also is has a slightly
173 // different presentation (smaller font size). This is used for popups. 176 // different presentation (smaller font size). This is used for popups.
174 bool popup_window_mode_; 177 bool popup_window_mode_;
175 178
176 scoped_ptr<OmniboxPopupView> popup_view_; 179 scoped_ptr<OmniboxPopupView> popup_view_;
177 180
178 ToolbarModel::SecurityLevel security_level_; 181 ToolbarModel::SecurityLevel security_level_;
179 182
(...skipping 18 matching lines...) Expand all
198 // Should we select all the text when we see the mouse button get released? 201 // Should we select all the text when we see the mouse button get released?
199 // We select in response to a click that focuses the omnibox, but we defer 202 // We select in response to a click that focuses the omnibox, but we defer
200 // until release, setting this variable back to false if we saw a drag, to 203 // until release, setting this variable back to false if we saw a drag, to
201 // allow the user to select just a portion of the text. 204 // allow the user to select just a portion of the text.
202 bool select_all_on_mouse_release_; 205 bool select_all_on_mouse_release_;
203 206
204 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); 207 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
205 }; 208 };
206 209
207 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 210 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_view.h ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698