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

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

Issue 10337010: Revert r123782. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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
« no previous file with comments | « chrome/browser/ui/gtk/browser_titlebar.h ('k') | chrome/browser/ui/gtk/browser_toolbar_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser_titlebar.h" 5 #include "chrome/browser/ui/gtk/browser_titlebar.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/profiles/profile_info_cache.h" 25 #include "chrome/browser/profiles/profile_info_cache.h"
26 #include "chrome/browser/profiles/profile_manager.h" 26 #include "chrome/browser/profiles/profile_manager.h"
27 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
28 #include "chrome/browser/ui/gtk/accelerators_gtk.h" 28 #include "chrome/browser/ui/gtk/accelerators_gtk.h"
29 #include "chrome/browser/ui/gtk/avatar_menu_button_gtk.h" 29 #include "chrome/browser/ui/gtk/avatar_menu_button_gtk.h"
30 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 30 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
31 #include "chrome/browser/ui/gtk/custom_button.h" 31 #include "chrome/browser/ui/gtk/custom_button.h"
32 #if defined(USE_GCONF) 32 #if defined(USE_GCONF)
33 #include "chrome/browser/ui/gtk/gconf_titlebar_listener.h" 33 #include "chrome/browser/ui/gtk/gconf_titlebar_listener.h"
34 #endif 34 #endif
35 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
35 #include "chrome/browser/ui/gtk/gtk_util.h" 36 #include "chrome/browser/ui/gtk/gtk_util.h"
36 #include "chrome/browser/ui/gtk/menu_gtk.h" 37 #include "chrome/browser/ui/gtk/menu_gtk.h"
37 #include "chrome/browser/ui/gtk/nine_box.h" 38 #include "chrome/browser/ui/gtk/nine_box.h"
38 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" 39 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h"
39 #include "chrome/browser/ui/gtk/theme_service_gtk.h"
40 #include "chrome/browser/ui/gtk/unity_service.h" 40 #include "chrome/browser/ui/gtk/unity_service.h"
41 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" 41 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
42 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" 42 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
43 #include "chrome/common/chrome_notification_types.h" 43 #include "chrome/common/chrome_notification_types.h"
44 #include "chrome/common/chrome_switches.h" 44 #include "chrome/common/chrome_switches.h"
45 #include "chrome/common/pref_names.h" 45 #include "chrome/common/pref_names.h"
46 #include "content/public/browser/notification_service.h" 46 #include "content/public/browser/notification_service.h"
47 #include "content/public/browser/web_contents.h" 47 #include "content/public/browser/web_contents.h"
48 #include "grit/generated_resources.h" 48 #include "grit/generated_resources.h"
49 #include "grit/theme_resources.h" 49 #include "grit/theme_resources.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 app_mode_title_ = gtk_label_new(NULL); 367 app_mode_title_ = gtk_label_new(NULL);
368 gtk_label_set_ellipsize(GTK_LABEL(app_mode_title_), PANGO_ELLIPSIZE_END); 368 gtk_label_set_ellipsize(GTK_LABEL(app_mode_title_), PANGO_ELLIPSIZE_END);
369 gtk_misc_set_alignment(GTK_MISC(app_mode_title_), 0.0, 0.5); 369 gtk_misc_set_alignment(GTK_MISC(app_mode_title_), 0.0, 0.5);
370 gtk_box_pack_start(GTK_BOX(app_mode_hbox), app_mode_title_, TRUE, TRUE, 370 gtk_box_pack_start(GTK_BOX(app_mode_hbox), app_mode_title_, TRUE, TRUE,
371 0); 371 0);
372 372
373 UpdateTitleAndIcon(); 373 UpdateTitleAndIcon();
374 } 374 }
375 375
376 theme_service_ = ThemeServiceGtk::GetFrom( 376 theme_service_ = GtkThemeService::GetFrom(
377 browser_window_->browser()->profile()); 377 browser_window_->browser()->profile());
378 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 378 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
379 content::Source<ThemeService>(theme_service_)); 379 content::Source<ThemeService>(theme_service_));
380 theme_service_->InitThemesFor(this); 380 theme_service_->InitThemesFor(this);
381 381
382 gtk_widget_show_all(container_); 382 gtk_widget_show_all(container_);
383 383
384 ui::ActiveWindowWatcherX::AddObserver(this); 384 ui::ActiveWindowWatcherX::AddObserver(this);
385 } 385 }
386 386
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 ui::SimpleMenuModel::Delegate* delegate) 1109 ui::SimpleMenuModel::Delegate* delegate)
1110 : SimpleMenuModel(delegate) { 1110 : SimpleMenuModel(delegate) {
1111 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB); 1111 AddItemWithStringId(IDC_NEW_TAB, IDS_TAB_CXMENU_NEWTAB);
1112 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB); 1112 AddItemWithStringId(IDC_RESTORE_TAB, IDS_RESTORE_TAB);
1113 AddSeparator(); 1113 AddSeparator();
1114 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER); 1114 AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
1115 AddSeparator(); 1115 AddSeparator();
1116 AddCheckItemWithStringId(kShowWindowDecorationsCommand, 1116 AddCheckItemWithStringId(kShowWindowDecorationsCommand,
1117 IDS_SHOW_WINDOW_DECORATIONS_MENU); 1117 IDS_SHOW_WINDOW_DECORATIONS_MENU);
1118 } 1118 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_titlebar.h ('k') | chrome/browser/ui/gtk/browser_toolbar_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698