| 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_LOCATION_BAR_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // Creates, initializes, and packs the location icon, EV certificate name, | 276 // Creates, initializes, and packs the location icon, EV certificate name, |
| 277 // and optional border. | 277 // and optional border. |
| 278 void BuildSiteTypeArea(); | 278 void BuildSiteTypeArea(); |
| 279 | 279 |
| 280 // Enable or disable the location icon/EV certificate as a drag source for | 280 // Enable or disable the location icon/EV certificate as a drag source for |
| 281 // the URL. | 281 // the URL. |
| 282 void SetSiteTypeDragSource(); | 282 void SetSiteTypeDragSource(); |
| 283 | 283 |
| 284 GtkWidget* site_type_area() { return site_type_alignment_; } | 284 GtkWidget* site_type_area() { return site_type_alignment_; } |
| 285 | 285 |
| 286 // Creates and initializes the account area. |
| 287 void BuildAccountArea(); |
| 288 |
| 286 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, HandleExpose, | 289 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, HandleExpose, |
| 287 GdkEventExpose*); | 290 GdkEventExpose*); |
| 288 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnIconReleased, | 291 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnIconReleased, |
| 289 GdkEventButton*); | 292 GdkEventButton*); |
| 290 CHROMEGTK_CALLBACK_4(LocationBarViewGtk, void, OnIconDragData, | 293 CHROMEGTK_CALLBACK_4(LocationBarViewGtk, void, OnIconDragData, |
| 291 GdkDragContext*, GtkSelectionData*, guint, guint); | 294 GdkDragContext*, GtkSelectionData*, guint, guint); |
| 292 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragBegin, | 295 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragBegin, |
| 293 GdkDragContext*); | 296 GdkDragContext*); |
| 294 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragEnd, | 297 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragEnd, |
| 295 GdkDragContext*); | 298 GdkDragContext*); |
| 296 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnHboxSizeAllocate, | 299 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnHboxSizeAllocate, |
| 297 GtkAllocation*); | 300 GtkAllocation*); |
| 298 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnEntryBoxSizeAllocate, | 301 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnEntryBoxSizeAllocate, |
| 299 GtkAllocation*); | 302 GtkAllocation*); |
| 300 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnStarButtonPress, | 303 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnStarButtonPress, |
| 301 GdkEventButton*); | 304 GdkEventButton*); |
| 302 | 305 |
| 303 // Updates the site type area: changes the icon and shows/hides the EV | 306 // Updates the site type area: changes the icon and shows/hides the EV |
| 304 // certificate information. | 307 // certificate information. |
| 305 void UpdateSiteTypeArea(); | 308 void UpdateSiteTypeArea(); |
| 306 | 309 |
| 307 // Updates the maximum size of the EV certificate label. | 310 // Updates the maximum size of the EV certificate label. |
| 308 void UpdateEVCertificateLabelSize(); | 311 void UpdateEVCertificateLabelSize(); |
| 309 | 312 |
| 313 // Updates the account area: changes the username or login state. |
| 314 void UpdateAccountArea(); |
| 315 |
| 316 // Updates the maximum size of the account label. |
| 317 void UpdateAccountLabelSize(); |
| 318 |
| 310 // Sets the text that should be displayed in the info label and its associated | 319 // Sets the text that should be displayed in the info label and its associated |
| 311 // tooltip text. Call with an empty string if the info label should be | 320 // tooltip text. Call with an empty string if the info label should be |
| 312 // hidden. | 321 // hidden. |
| 313 void SetInfoText(); | 322 void SetInfoText(); |
| 314 | 323 |
| 315 // Set the keyword text for the Search BLAH: keyword box. | 324 // Set the keyword text for the Search BLAH: keyword box. |
| 316 void SetKeywordLabel(const string16& keyword); | 325 void SetKeywordLabel(const string16& keyword); |
| 317 | 326 |
| 318 // Set the keyword text for the "Press tab to search BLAH" hint box. | 327 // Set the keyword text for the "Press tab to search BLAH" hint box. |
| 319 void SetKeywordHintLabel(const string16& keyword); | 328 void SetKeywordHintLabel(const string16& keyword); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 346 // An icon to the left of the address bar. | 355 // An icon to the left of the address bar. |
| 347 GtkWidget* site_type_alignment_; | 356 GtkWidget* site_type_alignment_; |
| 348 GtkWidget* site_type_event_box_; | 357 GtkWidget* site_type_event_box_; |
| 349 GtkWidget* location_icon_image_; | 358 GtkWidget* location_icon_image_; |
| 350 GtkWidget* drag_icon_; | 359 GtkWidget* drag_icon_; |
| 351 bool enable_location_drag_; | 360 bool enable_location_drag_; |
| 352 // TODO(pkasting): Split this label off and move the rest of the items to the | 361 // TODO(pkasting): Split this label off and move the rest of the items to the |
| 353 // left of the address bar. | 362 // left of the address bar. |
| 354 GtkWidget* security_info_label_; | 363 GtkWidget* security_info_label_; |
| 355 | 364 |
| 365 // Account bubble. |
| 366 OwnedWidgetGtk account_alignment_; |
| 367 OwnedWidgetGtk account_event_box_; |
| 368 OwnedWidgetGtk account_icon_image_; |
| 369 GtkWidget* account_label_; |
| 370 |
| 356 // Content setting icons. | 371 // Content setting icons. |
| 357 OwnedWidgetGtk content_setting_hbox_; | 372 OwnedWidgetGtk content_setting_hbox_; |
| 358 ScopedVector<ContentSettingImageViewGtk> content_setting_views_; | 373 ScopedVector<ContentSettingImageViewGtk> content_setting_views_; |
| 359 | 374 |
| 360 // Extension page action icons. | 375 // Extension page action icons. |
| 361 OwnedWidgetGtk page_action_hbox_; | 376 OwnedWidgetGtk page_action_hbox_; |
| 362 ScopedVector<PageActionViewGtk> page_action_views_; | 377 ScopedVector<PageActionViewGtk> page_action_views_; |
| 363 | 378 |
| 364 // The widget that contains our tab hints and the location bar. | 379 // The widget that contains our tab hints and the location bar. |
| 365 GtkWidget* entry_box_; | 380 GtkWidget* entry_box_; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 // The last search keyword that was shown via the |tab_to_search_box_|. | 440 // The last search keyword that was shown via the |tab_to_search_box_|. |
| 426 string16 last_keyword_; | 441 string16 last_keyword_; |
| 427 | 442 |
| 428 // True if we should update the instant controller when the edit text changes. | 443 // True if we should update the instant controller when the edit text changes. |
| 429 bool update_instant_; | 444 bool update_instant_; |
| 430 | 445 |
| 431 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); | 446 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); |
| 432 }; | 447 }; |
| 433 | 448 |
| 434 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ | 449 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ |
| OLD | NEW |