| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class Profile; | 32 class Profile; |
| 33 | 33 |
| 34 namespace gfx { | 34 namespace gfx { |
| 35 class Font; | 35 class Font; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace ui { | 38 namespace ui { |
| 39 class MultiAnimation; | 39 class MultiAnimation; |
| 40 } | 40 } |
| 41 | 41 |
| 42 class ThemeServiceGtk; | 42 class GtkThemeService; |
| 43 | 43 |
| 44 class OmniboxViewGtk : public OmniboxView, | 44 class OmniboxViewGtk : public OmniboxView, |
| 45 public content::NotificationObserver, | 45 public content::NotificationObserver, |
| 46 public ui::AnimationDelegate { | 46 public ui::AnimationDelegate { |
| 47 public: | 47 public: |
| 48 // Modeled like the Windows CHARRANGE. Represent a pair of cursor position | 48 // Modeled like the Windows CHARRANGE. Represent a pair of cursor position |
| 49 // offsets. Since GtkTextIters are invalid after the buffer is changed, we | 49 // offsets. Since GtkTextIters are invalid after the buffer is changed, we |
| 50 // work in character offsets (not bytes). | 50 // work in character offsets (not bytes). |
| 51 struct CharRange { | 51 struct CharRange { |
| 52 CharRange() : cp_min(0), cp_max(0) { } | 52 CharRange() : cp_min(0), cp_max(0) { } |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 // IDs of the signal handlers for "mark-set" on |text_buffer_|. | 401 // IDs of the signal handlers for "mark-set" on |text_buffer_|. |
| 402 gulong mark_set_handler_id_; | 402 gulong mark_set_handler_id_; |
| 403 gulong mark_set_handler_id2_; | 403 gulong mark_set_handler_id2_; |
| 404 | 404 |
| 405 // Is the first mouse button currently down? When selection marks get moved, | 405 // Is the first mouse button currently down? When selection marks get moved, |
| 406 // we use this to determine if the user was highlighting text with the mouse | 406 // we use this to determine if the user was highlighting text with the mouse |
| 407 // -- if so, we avoid selecting all the text on mouse-up. | 407 // -- if so, we avoid selecting all the text on mouse-up. |
| 408 bool button_1_pressed_; | 408 bool button_1_pressed_; |
| 409 | 409 |
| 410 // Supplies colors, et cetera. | 410 // Supplies colors, et cetera. |
| 411 ThemeServiceGtk* theme_service_; | 411 GtkThemeService* theme_service_; |
| 412 | 412 |
| 413 content::NotificationRegistrar registrar_; | 413 content::NotificationRegistrar registrar_; |
| 414 | 414 |
| 415 // Indicates if Enter key was pressed. | 415 // Indicates if Enter key was pressed. |
| 416 // | 416 // |
| 417 // It's used in the key press handler to detect an Enter key press event | 417 // It's used in the key press handler to detect an Enter key press event |
| 418 // during sync dispatch of "end-user-action" signal so that an unexpected | 418 // during sync dispatch of "end-user-action" signal so that an unexpected |
| 419 // change caused by the event can be ignored in OnAfterPossibleChange(). | 419 // change caused by the event can be ignored in OnAfterPossibleChange(). |
| 420 bool enter_was_pressed_; | 420 bool enter_was_pressed_; |
| 421 | 421 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 // The view that is going to be focused next. Only valid while handling | 489 // The view that is going to be focused next. Only valid while handling |
| 490 // "focus-out" events. | 490 // "focus-out" events. |
| 491 GtkWidget* going_to_focus_; | 491 GtkWidget* going_to_focus_; |
| 492 | 492 |
| 493 ui::GtkSignalRegistrar signals_; | 493 ui::GtkSignalRegistrar signals_; |
| 494 | 494 |
| 495 DISALLOW_COPY_AND_ASSIGN(OmniboxViewGtk); | 495 DISALLOW_COPY_AND_ASSIGN(OmniboxViewGtk); |
| 496 }; | 496 }; |
| 497 | 497 |
| 498 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 498 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
| OLD | NEW |