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

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

Issue 176029: Linux: Simplify omnibox selection code and stop taking back selection. (Closed)
Patch Set: simplify selection ownership test Created 11 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 std::wstring text_before_change_; 355 std::wstring text_before_change_;
356 CharRange sel_before_change_; 356 CharRange sel_before_change_;
357 357
358 // The most-recently-selected text from the entry. This is updated on-the-fly 358 // The most-recently-selected text from the entry. This is updated on-the-fly
359 // as the user selects text. It is used in cases where we need to make the 359 // as the user selects text. It is used in cases where we need to make the
360 // PRIMARY selection persist even after the user has unhighlighted the text in 360 // PRIMARY selection persist even after the user has unhighlighted the text in
361 // the view (e.g. when they highlight some text and then click to unhighlight 361 // the view (e.g. when they highlight some text and then click to unhighlight
362 // it, we pass this string to SavePrimarySelection()). 362 // it, we pass this string to SavePrimarySelection()).
363 std::string selected_text_; 363 std::string selected_text_;
364 364
365 // Has the current value of |selected_text_| been saved as the PRIMARY
366 // selection?
367 bool selection_saved_;
368
369 // ID of the signal handler for "mark-set" on |text_buffer_|. 365 // ID of the signal handler for "mark-set" on |text_buffer_|.
370 gulong mark_set_handler_id_; 366 gulong mark_set_handler_id_;
371 367
372 // Is the first mouse button currently down? 368 // Is the first mouse button currently down?
373 bool button_1_pressed_; 369 bool button_1_pressed_;
374 370
375 // Did the user change the selected text in the middle of the current click? 371 // Did the user change the selected text in the middle of the current click?
376 // If so, we don't select all of the text when the button is released -- we 372 // If so, we don't select all of the text when the button is released -- we
377 // don't want to blow away their selection. 373 // don't want to blow away their selection.
378 bool text_selected_during_click_; 374 bool text_selected_during_click_;
(...skipping 23 matching lines...) Expand all
402 398
403 // If a character is inserted, store it in this variable so that it can 399 // If a character is inserted, store it in this variable so that it can
404 // be used later in "key-press-event" signal handler to determine if a Tab or 400 // be used later in "key-press-event" signal handler to determine if a Tab or
405 // Enter key event is handled by IME or not. 401 // Enter key event is handled by IME or not.
406 char char_inserted_; 402 char char_inserted_;
407 403
408 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); 404 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
409 }; 405 };
410 406
411 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 407 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698