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

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

Issue 7806001: Makes copying text in the omnibox always use permanent text is the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add another test Created 9 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // TODO(pkasting): When manually_selected_match_ moves to the controller, this 394 // TODO(pkasting): When manually_selected_match_ moves to the controller, this
395 // can move too. 395 // can move too.
396 void InfoForCurrentSelection(AutocompleteMatch* match, 396 void InfoForCurrentSelection(AutocompleteMatch* match,
397 GURL* alternate_nav_url) const; 397 GURL* alternate_nav_url) const;
398 398
399 // Returns the default match for the current text, as well as the alternate 399 // Returns the default match for the current text, as well as the alternate
400 // nav URL, if |alternate_nav_url| is non-NULL and there is such a URL. 400 // nav URL, if |alternate_nav_url| is non-NULL and there is such a URL.
401 void GetInfoForCurrentText(AutocompleteMatch* match, 401 void GetInfoForCurrentText(AutocompleteMatch* match,
402 GURL* alternate_nav_url) const; 402 GURL* alternate_nav_url) const;
403 403
404 // Returns true if |text| (which is display text in the current context)
405 // parses as a URL, and in that case sets |url| to the calculated URL.
406 // Subtle note: This ignores the desired_tld_ (unlike GetDataForURLExport()
407 // and CurrentTextIsURL()). The view needs this because it calls this
408 // function during copy handling, when the control key is down to trigger the
409 // copy.
410 bool GetURLForText(const string16& text, GURL* url) const;
411
412 // Reverts the edit box from a temporary text back to the original user text. 404 // Reverts the edit box from a temporary text back to the original user text.
413 // If |revert_popup| is true then the popup will be reverted as well. 405 // If |revert_popup| is true then the popup will be reverted as well.
414 void RevertTemporaryText(bool revert_popup); 406 void RevertTemporaryText(bool revert_popup);
415 407
416 // Accepts current keyword if the user only typed a space at the end of 408 // Accepts current keyword if the user only typed a space at the end of
417 // |new_user_text| comparing to the |old_user_text|. 409 // |new_user_text| comparing to the |old_user_text|.
418 // Returns true if the current keyword is accepted. 410 // Returns true if the current keyword is accepted.
419 bool MaybeAcceptKeywordBySpace(const string16& old_user_text, 411 bool MaybeAcceptKeywordBySpace(const string16& old_user_text,
420 const string16& new_user_text); 412 const string16& new_user_text);
421 413
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // It has no effect if a keyword is already selected. 552 // It has no effect if a keyword is already selected.
561 bool allow_exact_keyword_match_; 553 bool allow_exact_keyword_match_;
562 554
563 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|. 555 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|.
564 InstantCompleteBehavior instant_complete_behavior_; 556 InstantCompleteBehavior instant_complete_behavior_;
565 557
566 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); 558 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel);
567 }; 559 };
568 560
569 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 561 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698