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

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

Issue 8702002: Strip invalid characters (line breaks, tabs), javascript:schemes from the copied text while pasti... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 | « base/utf_string_conversion_utils.h ('k') | chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // revert about any current edits. Returns whether the key was handled. 284 // revert about any current edits. Returns whether the key was handled.
285 bool OnEscapeKeyPressed(); 285 bool OnEscapeKeyPressed();
286 286
287 // Called when the user presses or releases the control key. Changes state as 287 // Called when the user presses or releases the control key. Changes state as
288 // necessary. 288 // necessary.
289 void OnControlKeyChanged(bool pressed); 289 void OnControlKeyChanged(bool pressed);
290 290
291 // Called when the user pastes in text. 291 // Called when the user pastes in text.
292 void on_paste() { paste_state_ = PASTING; } 292 void on_paste() { paste_state_ = PASTING; }
293 293
294 // Returns true if pasting is in progress.
295 bool is_pasting() const { return paste_state_ == PASTING; }
296
294 // Called when the user presses up or down. |count| is a repeat count, 297 // Called when the user presses up or down. |count| is a repeat count,
295 // negative for moving up, positive for moving down. 298 // negative for moving up, positive for moving down.
296 void OnUpOrDownKeyPressed(int count); 299 void OnUpOrDownKeyPressed(int count);
297 300
298 // Called when any relevant data changes. This rolls together several 301 // Called when any relevant data changes. This rolls together several
299 // separate pieces of data into one call so we can update all the UI 302 // separate pieces of data into one call so we can update all the UI
300 // efficiently: 303 // efficiently:
301 // |text| is either the new temporary text from the user manually selecting 304 // |text| is either the new temporary text from the user manually selecting
302 // a different match, or the inline autocomplete text. We distinguish by 305 // a different match, or the inline autocomplete text. We distinguish by
303 // checking if |destination_for_temporary_text_change| is NULL. 306 // checking if |destination_for_temporary_text_change| is NULL.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // It has no effect if a keyword is already selected. 553 // It has no effect if a keyword is already selected.
551 bool allow_exact_keyword_match_; 554 bool allow_exact_keyword_match_;
552 555
553 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|. 556 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|.
554 InstantCompleteBehavior instant_complete_behavior_; 557 InstantCompleteBehavior instant_complete_behavior_;
555 558
556 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); 559 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel);
557 }; 560 };
558 561
559 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 562 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
OLDNEW
« no previous file with comments | « base/utf_string_conversion_utils.h ('k') | chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698