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

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

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

Powered by Google App Engine
This is Rietveld 408576698