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

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

Issue 7749017: Revert "content: Start splitting up chrome/browser/ui/gtk/gtk_util.h" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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) 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 #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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "chrome/common/extensions/extension_resource.h" 53 #include "chrome/common/extensions/extension_resource.h"
54 #include "chrome/common/pref_names.h" 54 #include "chrome/common/pref_names.h"
55 #include "content/browser/tab_contents/tab_contents.h" 55 #include "content/browser/tab_contents/tab_contents.h"
56 #include "content/common/notification_service.h" 56 #include "content/common/notification_service.h"
57 #include "content/common/page_transition_types.h" 57 #include "content/common/page_transition_types.h"
58 #include "grit/generated_resources.h" 58 #include "grit/generated_resources.h"
59 #include "grit/theme_resources.h" 59 #include "grit/theme_resources.h"
60 #include "grit/theme_resources_standard.h" 60 #include "grit/theme_resources_standard.h"
61 #include "net/base/net_util.h" 61 #include "net/base/net_util.h"
62 #include "ui/base/dragdrop/gtk_dnd_util.h" 62 #include "ui/base/dragdrop/gtk_dnd_util.h"
63 #include "ui/base/gtk/gtk_hig_constants.h"
64 #include "ui/base/l10n/l10n_util.h" 63 #include "ui/base/l10n/l10n_util.h"
65 #include "ui/base/resource/resource_bundle.h" 64 #include "ui/base/resource/resource_bundle.h"
66 #include "ui/gfx/canvas_skia_paint.h" 65 #include "ui/gfx/canvas_skia_paint.h"
67 #include "ui/gfx/font.h" 66 #include "ui/gfx/font.h"
68 #include "ui/gfx/gtk_util.h" 67 #include "ui/gfx/gtk_util.h"
69 #include "ui/gfx/image/image.h" 68 #include "ui/gfx/image/image.h"
70 #include "webkit/glue/window_open_disposition.h" 69 #include "webkit/glue/window_open_disposition.h"
71 70
72 namespace { 71 namespace {
73 72
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 gtk_widget_set_size_request(entry_box_, 0, -1); 216 gtk_widget_set_size_request(entry_box_, 0, -1);
218 gtk_box_pack_start(GTK_BOX(hbox_.get()), entry_box_, TRUE, TRUE, 0); 217 gtk_box_pack_start(GTK_BOX(hbox_.get()), entry_box_, TRUE, TRUE, 0);
219 218
220 // We need to adjust the visibility of the search hint widgets according to 219 // We need to adjust the visibility of the search hint widgets according to
221 // the horizontal space in the |entry_box_|. 220 // the horizontal space in the |entry_box_|.
222 g_signal_connect(entry_box_, "size-allocate", 221 g_signal_connect(entry_box_, "size-allocate",
223 G_CALLBACK(&OnEntryBoxSizeAllocateThunk), this); 222 G_CALLBACK(&OnEntryBoxSizeAllocateThunk), this);
224 223
225 // Tab to search (the keyword box on the left hand side). 224 // Tab to search (the keyword box on the left hand side).
226 tab_to_search_full_label_ = 225 tab_to_search_full_label_ =
227 theme_service_->BuildLabel("", ui::kGdkBlack); 226 theme_service_->BuildLabel("", gtk_util::kGdkBlack);
228 tab_to_search_partial_label_ = 227 tab_to_search_partial_label_ =
229 theme_service_->BuildLabel("", ui::kGdkBlack); 228 theme_service_->BuildLabel("", gtk_util::kGdkBlack);
230 GtkWidget* tab_to_search_label_hbox = gtk_hbox_new(FALSE, 0); 229 GtkWidget* tab_to_search_label_hbox = gtk_hbox_new(FALSE, 0);
231 gtk_box_pack_start(GTK_BOX(tab_to_search_label_hbox), 230 gtk_box_pack_start(GTK_BOX(tab_to_search_label_hbox),
232 tab_to_search_full_label_, FALSE, FALSE, 0); 231 tab_to_search_full_label_, FALSE, FALSE, 0);
233 gtk_box_pack_start(GTK_BOX(tab_to_search_label_hbox), 232 gtk_box_pack_start(GTK_BOX(tab_to_search_label_hbox),
234 tab_to_search_partial_label_, FALSE, FALSE, 0); 233 tab_to_search_partial_label_, FALSE, FALSE, 0);
235 GtkWidget* tab_to_search_hbox = gtk_hbox_new(FALSE, 0); 234 GtkWidget* tab_to_search_hbox = gtk_hbox_new(FALSE, 0);
236 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 235 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
237 tab_to_search_magnifier_ = gtk_image_new_from_pixbuf( 236 tab_to_search_magnifier_ = gtk_image_new_from_pixbuf(
238 rb.GetNativeImageNamed(IDR_KEYWORD_SEARCH_MAGNIFIER)); 237 rb.GetNativeImageNamed(IDR_KEYWORD_SEARCH_MAGNIFIER));
239 gtk_box_pack_start(GTK_BOX(tab_to_search_hbox), tab_to_search_magnifier_, 238 gtk_box_pack_start(GTK_BOX(tab_to_search_hbox), tab_to_search_magnifier_,
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 1622
1624 std::string badge_text = page_action_->GetBadgeText(tab_id); 1623 std::string badge_text = page_action_->GetBadgeText(tab_id);
1625 if (badge_text.empty()) 1624 if (badge_text.empty())
1626 return FALSE; 1625 return FALSE;
1627 1626
1628 gfx::CanvasSkiaPaint canvas(event, false); 1627 gfx::CanvasSkiaPaint canvas(event, false);
1629 gfx::Rect bounding_rect(widget->allocation); 1628 gfx::Rect bounding_rect(widget->allocation);
1630 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); 1629 page_action_->PaintBadge(&canvas, bounding_rect, tab_id);
1631 return FALSE; 1630 return FALSE;
1632 } 1631 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/instant_confirm_dialog_gtk.cc ('k') | chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698