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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 10584042: Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge Created 8 years, 5 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 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 IDR_OMNIBOX_HTTP, 100 IDR_OMNIBOX_HTTP,
101 IDR_OMNIBOX_HTTP_DARK, 101 IDR_OMNIBOX_HTTP_DARK,
102 IDR_OMNIBOX_SEARCH, 102 IDR_OMNIBOX_SEARCH,
103 IDR_OMNIBOX_SEARCH_DARK, 103 IDR_OMNIBOX_SEARCH_DARK,
104 IDR_OMNIBOX_STAR, 104 IDR_OMNIBOX_STAR,
105 IDR_OMNIBOX_STAR_DARK, 105 IDR_OMNIBOX_STAR_DARK,
106 IDR_OMNIBOX_TTS, 106 IDR_OMNIBOX_TTS,
107 IDR_OMNIBOX_TTS_DARK, 107 IDR_OMNIBOX_TTS_DARK,
108 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON, 108 IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON,
109 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON, 109 IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON,
110 IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON,
110 }; 111 };
111 112
112 // This table converts button ids into a pair of gtk-stock id and state. 113 // This table converts button ids into a pair of gtk-stock id and state.
113 struct IDRGtkMapping { 114 struct IDRGtkMapping {
114 int idr; 115 int idr;
115 const char* stock_id; 116 const char* stock_id;
116 GtkStateType gtk_state; 117 GtkStateType gtk_state;
117 } const kGtkIcons[] = { 118 } const kGtkIcons[] = {
118 { IDR_BACK, GTK_STOCK_GO_BACK, GTK_STATE_NORMAL }, 119 { IDR_BACK, GTK_STOCK_GO_BACK, GTK_STATE_NORMAL },
119 { IDR_BACK_D, GTK_STOCK_GO_BACK, GTK_STATE_INSENSITIVE }, 120 { IDR_BACK_D, GTK_STOCK_GO_BACK, GTK_STATE_INSENSITIVE },
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and 674 // Icons that sit inside the omnibox shouldn't receive TINT_BUTTONS and
674 // instead should tint based on the foreground text entry color in GTK+ 675 // instead should tint based on the foreground text entry color in GTK+
675 // mode because some themes that try to be dark *and* light have very 676 // mode because some themes that try to be dark *and* light have very
676 // different colors between the omnibox and the normal background area. 677 // different colors between the omnibox and the normal background area.
677 case IDR_OMNIBOX_EXTENSION_APP: 678 case IDR_OMNIBOX_EXTENSION_APP:
678 case IDR_OMNIBOX_HTTP: 679 case IDR_OMNIBOX_HTTP:
679 case IDR_OMNIBOX_SEARCH: 680 case IDR_OMNIBOX_SEARCH:
680 case IDR_OMNIBOX_STAR: 681 case IDR_OMNIBOX_STAR:
681 case IDR_OMNIBOX_TTS: 682 case IDR_OMNIBOX_TTS:
682 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON: 683 case IDR_GEOLOCATION_ALLOWED_LOCATIONBAR_ICON:
683 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON: { 684 case IDR_GEOLOCATION_DENIED_LOCATIONBAR_ICON:
685 case IDR_REGISTER_PROTOCOL_HANDLER_LOCATIONBAR_ICON: {
684 return GenerateTintedIcon(id, entry_tint_); 686 return GenerateTintedIcon(id, entry_tint_);
685 } 687 }
686 // In GTK mode, the dark versions of the omnibox icons only ever appear in 688 // In GTK mode, the dark versions of the omnibox icons only ever appear in
687 // the autocomplete popup and only against the current theme's GtkEntry 689 // the autocomplete popup and only against the current theme's GtkEntry
688 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide 690 // base[GTK_STATE_SELECTED] color, so tint the icons so they won't collide
689 // with the selected color. 691 // with the selected color.
690 case IDR_OMNIBOX_EXTENSION_APP_DARK: 692 case IDR_OMNIBOX_EXTENSION_APP_DARK:
691 case IDR_OMNIBOX_HTTP_DARK: 693 case IDR_OMNIBOX_HTTP_DARK:
692 case IDR_OMNIBOX_SEARCH_DARK: 694 case IDR_OMNIBOX_SEARCH_DARK:
693 case IDR_OMNIBOX_STAR_DARK: 695 case IDR_OMNIBOX_STAR_DARK:
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 950
949 void Gtk2UI::ClearAllThemeData() { 951 void Gtk2UI::ClearAllThemeData() {
950 STLDeleteValues(&gtk_images_); 952 STLDeleteValues(&gtk_images_);
951 } 953 }
952 954
953 } // namespace libgtk2ui 955 } // namespace libgtk2ui
954 956
955 ui::LinuxUI* BuildGtk2UI() { 957 ui::LinuxUI* BuildGtk2UI() {
956 return new libgtk2ui::Gtk2UI; 958 return new libgtk2ui::Gtk2UI;
957 } 959 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698