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

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

Issue 12256040: Second batch of fixing prefs registrations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments and merge LKGR. Created 7 years, 10 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 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/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 if (!GetBrowserWindowForNativeWindow(window)) 1479 if (!GetBrowserWindowForNativeWindow(window))
1480 return NULL; 1480 return NULL;
1481 return window; 1481 return window;
1482 } 1482 }
1483 1483
1484 GtkWidget* BrowserWindowGtk::titlebar_widget() const { 1484 GtkWidget* BrowserWindowGtk::titlebar_widget() const {
1485 return titlebar_->widget(); 1485 return titlebar_->widget();
1486 } 1486 }
1487 1487
1488 // static 1488 // static
1489 void BrowserWindowGtk::RegisterUserPrefs(PrefService* prefs, 1489 void BrowserWindowGtk::RegisterUserPrefs(PrefRegistrySyncable* registry) {
1490 PrefRegistrySyncable* registry) {
1491 // TODO(joi): Remove PrefService parameter.
1492 bool custom_frame_default = false; 1490 bool custom_frame_default = false;
1493 // Avoid checking the window manager if we're not connected to an X server (as 1491 // Avoid checking the window manager if we're not connected to an X server (as
1494 // is the case in Valgrind tests). 1492 // is the case in Valgrind tests).
1495 if (ui::XDisplayExists() && 1493 if (ui::XDisplayExists())
1496 !prefs->HasPrefPath(prefs::kUseCustomChromeFrame)) {
1497 custom_frame_default = GetCustomFramePrefDefault(); 1494 custom_frame_default = GetCustomFramePrefDefault();
1498 } 1495
1499 registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame, 1496 registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
Jói 2013/02/18 16:09:27 Note that this only sets the default value, and do
1500 custom_frame_default, 1497 custom_frame_default,
1501 PrefRegistrySyncable::UNSYNCABLE_PREF); 1498 PrefRegistrySyncable::UNSYNCABLE_PREF);
1502 } 1499 }
1503 1500
1504 WebContents* BrowserWindowGtk::GetDisplayedTab() { 1501 WebContents* BrowserWindowGtk::GetDisplayedTab() {
1505 return contents_container_->GetVisibleTab(); 1502 return contents_container_->GetVisibleTab();
1506 } 1503 }
1507 1504
1508 void BrowserWindowGtk::QueueToolbarRedraw() { 1505 void BrowserWindowGtk::QueueToolbarRedraw() {
1509 gtk_widget_queue_draw(toolbar_->widget()); 1506 gtk_widget_queue_draw(toolbar_->widget());
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2409 wm_type == ui::WM_OPENBOX || 2406 wm_type == ui::WM_OPENBOX ||
2410 wm_type == ui::WM_XFWM4); 2407 wm_type == ui::WM_XFWM4);
2411 } 2408 }
2412 2409
2413 // static 2410 // static
2414 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2411 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2415 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2412 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2416 browser_window_gtk->Init(); 2413 browser_window_gtk->Init();
2417 return browser_window_gtk; 2414 return browser_window_gtk;
2418 } 2415 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.h ('k') | chrome/browser/ui/views/browser_actions_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698