| OLD | NEW |
| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> | 265 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> |
| 266 HandleViewMoveFocus(widget); | 266 HandleViewMoveFocus(widget); |
| 267 } | 267 } |
| 268 void HandleViewMoveFocus(GtkWidget* widget); | 268 void HandleViewMoveFocus(GtkWidget* widget); |
| 269 | 269 |
| 270 static void HandleCopyClipboardThunk(GtkTextView* text_view, gpointer self) { | 270 static void HandleCopyClipboardThunk(GtkTextView* text_view, gpointer self) { |
| 271 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleCopyClipboard(); | 271 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleCopyClipboard(); |
| 272 } | 272 } |
| 273 void HandleCopyClipboard(); | 273 void HandleCopyClipboard(); |
| 274 | 274 |
| 275 static void HandlePasteClipboardThunk(GtkTextView* text_view, gpointer self) { |
| 276 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandlePasteClipboard(); |
| 277 } |
| 278 void HandlePasteClipboard(); |
| 279 |
| 275 // Actual implementation of SelectAll(), but also provides control over | 280 // Actual implementation of SelectAll(), but also provides control over |
| 276 // whether the PRIMARY selection is set to the selected text (in SelectAll(), | 281 // whether the PRIMARY selection is set to the selected text (in SelectAll(), |
| 277 // it isn't, but we want set the selection when the user clicks in the entry). | 282 // it isn't, but we want set the selection when the user clicks in the entry). |
| 278 void SelectAllInternal(bool reversed, bool update_primary_selection); | 283 void SelectAllInternal(bool reversed, bool update_primary_selection); |
| 279 | 284 |
| 280 // Get ready to update |text_buffer_|'s highlighting without making changes to | 285 // Get ready to update |text_buffer_|'s highlighting without making changes to |
| 281 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and | 286 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and |
| 282 // blocks the "mark-set" signal handler. | 287 // blocks the "mark-set" signal handler. |
| 283 void StartUpdatingHighlightedText(); | 288 void StartUpdatingHighlightedText(); |
| 284 | 289 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 388 |
| 384 NotificationRegistrar registrar_; | 389 NotificationRegistrar registrar_; |
| 385 #endif | 390 #endif |
| 386 | 391 |
| 387 // Indicates if Tab key was pressed. | 392 // Indicates if Tab key was pressed. |
| 388 // | 393 // |
| 389 // It's only used in the key press handler to detect a Tab key press event | 394 // It's only used in the key press handler to detect a Tab key press event |
| 390 // during sync dispatch of "move-focus" signal. | 395 // during sync dispatch of "move-focus" signal. |
| 391 bool tab_was_pressed_; | 396 bool tab_was_pressed_; |
| 392 | 397 |
| 398 // Indicates that user requested to paste clipboard. |
| 399 // The actual paste clipboard action might be performed later if the |
| 400 // clipboard is not empty. |
| 401 bool paste_clipboard_requested_; |
| 402 |
| 393 // If a character is inserted, store it in this variable so that it can | 403 // If a character is inserted, store it in this variable so that it can |
| 394 // be used later in "key-press-event" signal handler to determine if a Tab or | 404 // be used later in "key-press-event" signal handler to determine if a Tab or |
| 395 // Enter key event is handled by IME or not. | 405 // Enter key event is handled by IME or not. |
| 396 char char_inserted_; | 406 char char_inserted_; |
| 397 | 407 |
| 398 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); | 408 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); |
| 399 }; | 409 }; |
| 400 | 410 |
| 401 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ | 411 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ |
| OLD | NEW |