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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.h

Issue 10889052: Display action box menu on Linux/gtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed incorrectly positioned bubble problem. Created 8 years, 3 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) 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_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 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 scoped_refptr<ExtensionContextMenuModel> context_menu_model_; 333 scoped_refptr<ExtensionContextMenuModel> context_menu_model_;
334 334
335 // Fade-in animation for the icon with observer scoped to this. 335 // Fade-in animation for the icon with observer scoped to this.
336 ExtensionAction::IconAnimation::ScopedObserver 336 ExtensionAction::IconAnimation::ScopedObserver
337 scoped_icon_animation_observer_; 337 scoped_icon_animation_observer_;
338 338
339 DISALLOW_COPY_AND_ASSIGN(PageActionViewGtk); 339 DISALLOW_COPY_AND_ASSIGN(PageActionViewGtk);
340 }; 340 };
341 friend class PageActionViewGtk; 341 friend class PageActionViewGtk;
342 342
343 class ShowStarBubbleAction;
344
343 // Creates, initializes, and packs the location icon, EV certificate name, 345 // Creates, initializes, and packs the location icon, EV certificate name,
344 // and optional border. 346 // and optional border.
345 void BuildSiteTypeArea(); 347 void BuildSiteTypeArea();
346 348
347 // Enable or disable the location icon/EV certificate as a drag source for 349 // Enable or disable the location icon/EV certificate as a drag source for
348 // the URL. 350 // the URL.
349 void SetSiteTypeDragSource(); 351 void SetSiteTypeDragSource();
350 352
351 GtkWidget* site_type_area() { return site_type_alignment_; } 353 GtkWidget* site_type_area() { return site_type_alignment_; }
352 354
353 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, HandleExpose, 355 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, HandleExpose,
354 GdkEventExpose*); 356 GdkEventExpose*);
355 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnIconReleased, 357 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnIconReleased,
356 GdkEventButton*); 358 GdkEventButton*);
357 CHROMEGTK_CALLBACK_4(LocationBarViewGtk, void, OnIconDragData, 359 CHROMEGTK_CALLBACK_4(LocationBarViewGtk, void, OnIconDragData,
358 GdkDragContext*, GtkSelectionData*, guint, guint); 360 GdkDragContext*, GtkSelectionData*, guint, guint);
359 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragBegin, 361 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragBegin,
360 GdkDragContext*); 362 GdkDragContext*);
361 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragEnd, 363 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnIconDragEnd,
362 GdkDragContext*); 364 GdkDragContext*);
363 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnHboxSizeAllocate, 365 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnHboxSizeAllocate,
364 GtkAllocation*); 366 GtkAllocation*);
365 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnEntryBoxSizeAllocate, 367 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnEntryBoxSizeAllocate,
366 GtkAllocation*); 368 GtkAllocation*);
367 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnZoomButtonPress, 369 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnZoomButtonPress,
368 GdkEventButton*); 370 GdkEventButton*);
371 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, void, OnStarButtonSizeAllocate,
372 GtkAllocation*);
369 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnStarButtonPress, 373 CHROMEGTK_CALLBACK_1(LocationBarViewGtk, gboolean, OnStarButtonPress,
370 GdkEventButton*); 374 GdkEventButton*);
371 375
372 // Updates the site type area: changes the icon and shows/hides the EV 376 // Updates the site type area: changes the icon and shows/hides the EV
373 // certificate information. 377 // certificate information.
374 void UpdateSiteTypeArea(); 378 void UpdateSiteTypeArea();
375 379
376 // Updates the maximum size of the EV certificate label. 380 // Updates the maximum size of the EV certificate label.
377 void UpdateEVCertificateLabelSize(); 381 void UpdateEVCertificateLabelSize();
378 382
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 ui::OwnedWidgetGtk hbox_; 422 ui::OwnedWidgetGtk hbox_;
419 423
420 // Zoom button. 424 // Zoom button.
421 ui::OwnedWidgetGtk zoom_; 425 ui::OwnedWidgetGtk zoom_;
422 GtkWidget* zoom_image_; 426 GtkWidget* zoom_image_;
423 427
424 // Star button. 428 // Star button.
425 ui::OwnedWidgetGtk star_; 429 ui::OwnedWidgetGtk star_;
426 GtkWidget* star_image_; 430 GtkWidget* star_image_;
427 bool starred_; 431 bool starred_;
432 bool star_sized_; // True after a size-allocate signal to the star widget.
433
434 // Information about the star bubble to show after the star icon has been
435 // sized, or NULL if no such action should be taken.
436 scoped_ptr<ShowStarBubbleAction> show_star_bubble_action_;
428 437
429 // An icon to the left of the address bar. 438 // An icon to the left of the address bar.
430 GtkWidget* site_type_alignment_; 439 GtkWidget* site_type_alignment_;
431 GtkWidget* site_type_event_box_; 440 GtkWidget* site_type_event_box_;
432 GtkWidget* location_icon_image_; 441 GtkWidget* location_icon_image_;
433 GtkWidget* drag_icon_; 442 GtkWidget* drag_icon_;
434 bool enable_location_drag_; 443 bool enable_location_drag_;
435 // TODO(pkasting): Split this label off and move the rest of the items to the 444 // TODO(pkasting): Split this label off and move the rest of the items to the
436 // left of the address bar. 445 // left of the address bar.
437 GtkWidget* security_info_label_; 446 GtkWidget* security_info_label_;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 BooleanPrefMember edit_bookmarks_enabled_; 530 BooleanPrefMember edit_bookmarks_enabled_;
522 531
523 // Used to remember the URL and title text when drag&drop has begun. 532 // Used to remember the URL and title text when drag&drop has begun.
524 GURL drag_url_; 533 GURL drag_url_;
525 string16 drag_title_; 534 string16 drag_title_;
526 535
527 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk); 536 DISALLOW_COPY_AND_ASSIGN(LocationBarViewGtk);
528 }; 537 };
529 538
530 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_ 539 #endif // CHROME_BROWSER_UI_GTK_LOCATION_BAR_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698