| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 const int kContentSettingImageDisplayTime = 3200; | 147 const int kContentSettingImageDisplayTime = 3200; |
| 148 // The time, in ms, of the animation (open and close). | 148 // The time, in ms, of the animation (open and close). |
| 149 const int kContentSettingImageAnimationTime = 150; | 149 const int kContentSettingImageAnimationTime = 150; |
| 150 | 150 |
| 151 // Color of border of content setting area (icon/label). | 151 // Color of border of content setting area (icon/label). |
| 152 const GdkColor kContentSettingBorderColor = GDK_COLOR_RGB(0xe9, 0xb9, 0x66); | 152 const GdkColor kContentSettingBorderColor = GDK_COLOR_RGB(0xe9, 0xb9, 0x66); |
| 153 // Colors for the background gradient. | 153 // Colors for the background gradient. |
| 154 const GdkColor kContentSettingTopColor = GDK_COLOR_RGB(0xff, 0xf8, 0xd4); | 154 const GdkColor kContentSettingTopColor = GDK_COLOR_RGB(0xff, 0xf8, 0xd4); |
| 155 const GdkColor kContentSettingBottomColor = GDK_COLOR_RGB(0xff, 0xe6, 0xaf); | 155 const GdkColor kContentSettingBottomColor = GDK_COLOR_RGB(0xff, 0xe6, 0xaf); |
| 156 | 156 |
| 157 // Styling for gray button. | |
| 158 const GdkColor kGrayBorderColor = GDK_COLOR_RGB(0xa0, 0xa0, 0xa0); | |
| 159 const GdkColor kTopColorGray = GDK_COLOR_RGB(0xe5, 0xe5, 0xe5); | |
| 160 const GdkColor kBottomColorGray = GDK_COLOR_RGB(0xd0, 0xd0, 0xd0); | |
| 161 | |
| 162 inline int InnerPadding() { | 157 inline int InnerPadding() { |
| 163 return extensions::FeatureSwitch::script_badges()->IsEnabled() ? | 158 return extensions::FeatureSwitch::script_badges()->IsEnabled() ? |
| 164 kScriptBadgeInnerPadding : kInnerPadding; | 159 kScriptBadgeInnerPadding : kInnerPadding; |
| 165 } | 160 } |
| 166 | 161 |
| 167 // If widget is visible, increment the int pointed to by count. | 162 // If widget is visible, increment the int pointed to by count. |
| 168 // Suitible for use with gtk_container_foreach. | 163 // Suitible for use with gtk_container_foreach. |
| 169 void CountVisibleWidgets(GtkWidget* widget, gpointer count) { | 164 void CountVisibleWidgets(GtkWidget* widget, gpointer count) { |
| 170 if (gtk_widget_get_visible(widget)) | 165 if (gtk_widget_get_visible(widget)) |
| 171 *static_cast<int*>(count) += 1; | 166 *static_cast<int*>(count) += 1; |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2169 | 2164 |
| 2170 GdkEventButton event = {}; | 2165 GdkEventButton event = {}; |
| 2171 event.type = GDK_BUTTON_PRESS; | 2166 event.type = GDK_BUTTON_PRESS; |
| 2172 event.button = 1; | 2167 event.button = 1; |
| 2173 return view->OnButtonPressed(view->widget(), &event); | 2168 return view->OnButtonPressed(view->widget(), &event); |
| 2174 } | 2169 } |
| 2175 | 2170 |
| 2176 void LocationBarViewGtk::PageActionViewGtk::OnIconChanged() { | 2171 void LocationBarViewGtk::PageActionViewGtk::OnIconChanged() { |
| 2177 UpdateVisibility(owner_->GetWebContents(), current_url_); | 2172 UpdateVisibility(owner_->GetWebContents(), current_url_); |
| 2178 } | 2173 } |
| OLD | NEW |