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

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

Issue 6252003: Accept keyword by pressing space. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only allow 0x0020 and 0x3000 for now. Created 9 years, 11 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) 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_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 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 virtual void AnimationCanceled(const ui::Animation* animation); 178 virtual void AnimationCanceled(const ui::Animation* animation);
179 179
180 // Sets the colors of the text view according to the theme. 180 // Sets the colors of the text view according to the theme.
181 void SetBaseColor(); 181 void SetBaseColor();
182 // Sets the colors of the instant suggestion view according to the theme and 182 // Sets the colors of the instant suggestion view according to the theme and
183 // the animation state. 183 // the animation state.
184 void UpdateInstantViewColors(); 184 void UpdateInstantViewColors();
185 185
186 bool CommitInstantSuggestion(); 186 bool CommitInstantSuggestion();
187 187
188 // Used by LocationBarViewGtk to inform AutocompleteEditViewGtk if the tab to
189 // search should be enabled or not. See the comment of |enable_tab_to_search_|
190 // for details.
191 void set_enable_tab_to_search(bool enable) {
192 enable_tab_to_search_ = enable;
193 }
194
195 GtkWidget* text_view() { 188 GtkWidget* text_view() {
196 return text_view_; 189 return text_view_;
197 } 190 }
198 191
199 private: 192 private:
200 CHROMEG_CALLBACK_0(AutocompleteEditViewGtk, void, HandleBeginUserAction, 193 CHROMEG_CALLBACK_0(AutocompleteEditViewGtk, void, HandleBeginUserAction,
201 GtkTextBuffer*); 194 GtkTextBuffer*);
202 CHROMEG_CALLBACK_0(AutocompleteEditViewGtk, void, HandleEndUserAction, 195 CHROMEG_CALLBACK_0(AutocompleteEditViewGtk, void, HandleEndUserAction,
203 GtkTextBuffer*); 196 GtkTextBuffer*);
204 CHROMEG_CALLBACK_2(AutocompleteEditViewGtk, void, HandleMarkSet, 197 CHROMEG_CALLBACK_2(AutocompleteEditViewGtk, void, HandleMarkSet,
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // Indicates whether the IME changed the text. It's possible for the IME to 481 // Indicates whether the IME changed the text. It's possible for the IME to
489 // handle a key event but not change the text contents (e.g., when pressing 482 // handle a key event but not change the text contents (e.g., when pressing
490 // shift+del with no selection). 483 // shift+del with no selection).
491 bool text_changed_; 484 bool text_changed_;
492 485
493 // Contains the character range that should have a strikethrough (used for 486 // Contains the character range that should have a strikethrough (used for
494 // insecure schemes). If the range is size one or less, no strikethrough 487 // insecure schemes). If the range is size one or less, no strikethrough
495 // is needed. 488 // is needed.
496 CharRange strikethrough_; 489 CharRange strikethrough_;
497 490
498 // Indicate if the tab to search should be enabled or not. It's true by
499 // default and will only be set to false if the location bar view is not able
500 // to show the tab to search hint.
501 bool enable_tab_to_search_;
502
503 // Indicates if the selected text is suggested text or not. If the selection 491 // Indicates if the selected text is suggested text or not. If the selection
504 // is not suggested text, that means the user manually made the selection. 492 // is not suggested text, that means the user manually made the selection.
505 bool selection_suggested_; 493 bool selection_suggested_;
506 494
507 // Was delete pressed? 495 // Was delete pressed?
508 bool delete_was_pressed_; 496 bool delete_was_pressed_;
509 497
510 // Was the delete key pressed with an empty selection at the end of the edit? 498 // Was the delete key pressed with an empty selection at the end of the edit?
511 bool delete_at_end_pressed_; 499 bool delete_at_end_pressed_;
512 500
(...skipping 24 matching lines...) Expand all
537 ui::GtkSignalRegistrar signals_; 525 ui::GtkSignalRegistrar signals_;
538 526
539 #if defined(TOOLKIT_VIEWS) 527 #if defined(TOOLKIT_VIEWS)
540 scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; 528 scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_;
541 #endif 529 #endif
542 530
543 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); 531 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk);
544 }; 532 };
545 533
546 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ 534 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698