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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit.h

Issue 3152029: Ctrl-based actions should take precedence over ctrl-enter (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Cleaning things up Created 10 years, 4 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/autocomplete/autocomplete.h" 9 #include "chrome/browser/autocomplete/autocomplete.h"
10 #include "chrome/common/notification_observer.h" 10 #include "chrome/common/notification_observer.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 }; 320 };
321 321
322 // NotificationObserver 322 // NotificationObserver
323 virtual void Observe(NotificationType type, 323 virtual void Observe(NotificationType type,
324 const NotificationSource& source, 324 const NotificationSource& source,
325 const NotificationDetails& details); 325 const NotificationDetails& details);
326 326
327 // Called whenever user_text_ should change. 327 // Called whenever user_text_ should change.
328 void InternalSetUserText(const std::wstring& text); 328 void InternalSetUserText(const std::wstring& text);
329 329
330 // Returns true if a keyword is selected.
331 bool KeywordIsSelected() const;
332
330 // Conversion between user text and display text. User text is the text the 333 // Conversion between user text and display text. User text is the text the
331 // user has input. Display text is the text being shown in the edit. The 334 // user has input. Display text is the text being shown in the edit. The
332 // two are different if a keyword is selected. 335 // two are different if a keyword is selected.
333 std::wstring DisplayTextFromUserText(const std::wstring& text) const; 336 std::wstring DisplayTextFromUserText(const std::wstring& text) const;
334 std::wstring UserTextFromDisplayText(const std::wstring& text) const; 337 std::wstring UserTextFromDisplayText(const std::wstring& text) const;
335 338
336 // Returns the default match for the current text, as well as the alternate 339 // Returns the default match for the current text, as well as the alternate
337 // nav URL, if |alternate_nav_url| is non-NULL and there is such a URL. 340 // nav URL, if |alternate_nav_url| is non-NULL and there is such a URL.
338 void GetInfoForCurrentText(AutocompleteMatch* match, 341 void GetInfoForCurrentText(AutocompleteMatch* match,
339 GURL* alternate_nav_url) const; 342 GURL* alternate_nav_url) const;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 mutable GURL paste_and_go_url_; 440 mutable GURL paste_and_go_url_;
438 mutable PageTransition::Type paste_and_go_transition_; 441 mutable PageTransition::Type paste_and_go_transition_;
439 mutable GURL paste_and_go_alternate_nav_url_; 442 mutable GURL paste_and_go_alternate_nav_url_;
440 443
441 Profile* profile_; 444 Profile* profile_;
442 445
443 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); 446 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel);
444 }; 447 };
445 448
446 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 449 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698