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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.cc

Issue 10787037: browser/ui: Share BookmarkBarInstructions delegate between gtk and views. (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/gtk/bookmarks/bookmark_bar_instructions_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "chrome/browser/ui/bookmarks/bookmark_bar_instructions_delegate.h"
8 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 9 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
9 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" 10 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h"
10 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 11 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
11 #include "chrome/browser/ui/gtk/gtk_util.h" 12 #include "chrome/browser/ui/gtk/gtk_util.h"
12 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
13 #include "content/public/browser/notification_source.h" 14 #include "content/public/browser/notification_source.h"
14 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
16 17
17 BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate, 18 BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(
18 Profile* profile) 19 chrome::BookmarkBarInstructionsDelegate* delegate,
20 Profile* profile)
19 : delegate_(delegate), 21 : delegate_(delegate),
20 profile_(profile), 22 profile_(profile),
21 theme_service_(GtkThemeService::GetFrom(profile_)) { 23 theme_service_(GtkThemeService::GetFrom(profile_)) {
22 instructions_hbox_ = gtk_chrome_shrinkable_hbox_new(FALSE, FALSE, 0); 24 instructions_hbox_ = gtk_chrome_shrinkable_hbox_new(FALSE, FALSE, 0);
23 gtk_widget_set_size_request(instructions_hbox_, 0, -1); 25 gtk_widget_set_size_request(instructions_hbox_, 0, -1);
24 26
25 instructions_label_ = gtk_label_new( 27 instructions_label_ = gtk_label_new(
26 l10n_util::GetStringUTF8(IDS_BOOKMARKS_NO_ITEMS).c_str()); 28 l10n_util::GetStringUTF8(IDS_BOOKMARKS_NO_ITEMS).c_str());
27 gtk_misc_set_alignment(GTK_MISC(instructions_label_), 0, 0.5); 29 gtk_misc_set_alignment(GTK_MISC(instructions_label_), 0, 0.5);
28 gtk_util::CenterWidgetInHBox(instructions_hbox_, instructions_label_, 30 gtk_util::CenterWidgetInHBox(instructions_hbox_, instructions_label_,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ThemeService::GetDefaultColor( 84 ThemeService::GetDefaultColor(
83 ThemeService::COLOR_BOOKMARK_TEXT)) { 85 ThemeService::COLOR_BOOKMARK_TEXT)) {
84 gtk_chrome_link_button_set_normal_color( 86 gtk_chrome_link_button_set_normal_color(
85 GTK_CHROME_LINK_BUTTON(instructions_link_), NULL); 87 GTK_CHROME_LINK_BUTTON(instructions_link_), NULL);
86 } else { 88 } else {
87 gtk_chrome_link_button_set_normal_color( 89 gtk_chrome_link_button_set_normal_color(
88 GTK_CHROME_LINK_BUTTON(instructions_link_), &bookmark_color); 90 GTK_CHROME_LINK_BUTTON(instructions_link_), &bookmark_color);
89 } 91 }
90 } 92 }
91 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698