| OLD | NEW |
| 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_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 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "chrome/browser/autocomplete/autocomplete_match.h" | 17 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 18 #include "chrome/browser/ui/gtk/owned_widget_gtk.h" | |
| 19 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 18 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 20 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 19 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 21 #include "content/common/notification_observer.h" | 20 #include "content/common/notification_observer.h" |
| 22 #include "content/common/notification_registrar.h" | 21 #include "content/common/notification_registrar.h" |
| 23 #include "content/common/page_transition_types.h" | 22 #include "content/common/page_transition_types.h" |
| 24 #include "ui/base/animation/animation_delegate.h" | 23 #include "ui/base/animation/animation_delegate.h" |
| 25 #include "ui/base/gtk/gtk_signal.h" | 24 #include "ui/base/gtk/gtk_signal.h" |
| 26 #include "ui/base/gtk/gtk_signal_registrar.h" | 25 #include "ui/base/gtk/gtk_signal_registrar.h" |
| 26 #include "ui/base/gtk/owned_widget_gtk.h" |
| 27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
| 28 #include "webkit/glue/window_open_disposition.h" | 28 #include "webkit/glue/window_open_disposition.h" |
| 29 | 29 |
| 30 class AutocompleteEditController; | 30 class AutocompleteEditController; |
| 31 class AutocompleteEditModel; | 31 class AutocompleteEditModel; |
| 32 class AutocompletePopupView; | 32 class AutocompletePopupView; |
| 33 class Profile; | 33 class Profile; |
| 34 class TabContents; | 34 class TabContents; |
| 35 | 35 |
| 36 namespace gfx { | 36 namespace gfx { |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 // Adjusts vertical alignment of the |instant_view_| in the |text_view_|, to | 362 // Adjusts vertical alignment of the |instant_view_| in the |text_view_|, to |
| 363 // make sure they have the same baseline. | 363 // make sure they have the same baseline. |
| 364 void AdjustVerticalAlignmentOfInstantView(); | 364 void AdjustVerticalAlignmentOfInstantView(); |
| 365 | 365 |
| 366 // Stop showing the instant suggest auto-commit animation. | 366 // Stop showing the instant suggest auto-commit animation. |
| 367 void StopAnimation(); | 367 void StopAnimation(); |
| 368 | 368 |
| 369 // The widget we expose, used for vertically centering the real text edit, | 369 // The widget we expose, used for vertically centering the real text edit, |
| 370 // since the height will change based on the font / font size, etc. | 370 // since the height will change based on the font / font size, etc. |
| 371 OwnedWidgetGtk alignment_; | 371 ui::OwnedWidgetGtk alignment_; |
| 372 | 372 |
| 373 // The actual text entry which will be owned by the alignment_. The | 373 // The actual text entry which will be owned by the alignment_. The |
| 374 // reference will be set to NULL upon destruction to tell if the gtk | 374 // reference will be set to NULL upon destruction to tell if the gtk |
| 375 // widget tree has been destroyed. This is because gtk destroies child | 375 // widget tree has been destroyed. This is because gtk destroies child |
| 376 // widgets if the parent (alignemtn_)'s refcount does not go down to 0. | 376 // widgets if the parent (alignemtn_)'s refcount does not go down to 0. |
| 377 GtkWidget* text_view_; | 377 GtkWidget* text_view_; |
| 378 | 378 |
| 379 GtkTextTagTable* tag_table_; | 379 GtkTextTagTable* tag_table_; |
| 380 GtkTextBuffer* text_buffer_; | 380 GtkTextBuffer* text_buffer_; |
| 381 GtkTextTag* faded_text_tag_; | 381 GtkTextTag* faded_text_tag_; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 // The view that is going to be focused next. Only valid while handling | 538 // The view that is going to be focused next. Only valid while handling |
| 539 // "focus-out" events. | 539 // "focus-out" events. |
| 540 GtkWidget* going_to_focus_; | 540 GtkWidget* going_to_focus_; |
| 541 | 541 |
| 542 ui::GtkSignalRegistrar signals_; | 542 ui::GtkSignalRegistrar signals_; |
| 543 | 543 |
| 544 DISALLOW_COPY_AND_ASSIGN(OmniboxViewGtk); | 544 DISALLOW_COPY_AND_ASSIGN(OmniboxViewGtk); |
| 545 }; | 545 }; |
| 546 | 546 |
| 547 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ | 547 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_VIEW_GTK_H_ |
| OLD | NEW |