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

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

Issue 6735032: Get rid of PrefService::GetMutableDictionary/GetMutableList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another windows compile error Created 9 years, 8 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/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 <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "chrome/app/chrome_command_ids.h" 22 #include "chrome/app/chrome_command_ids.h"
23 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 23 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
24 #include "chrome/browser/bookmarks/bookmark_utils.h" 24 #include "chrome/browser/bookmarks/bookmark_utils.h"
25 #include "chrome/browser/browser_list.h" 25 #include "chrome/browser/browser_list.h"
26 #include "chrome/browser/browser_process.h" 26 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/debugger/devtools_window.h" 27 #include "chrome/browser/debugger/devtools_window.h"
28 #include "chrome/browser/download/download_item_model.h" 28 #include "chrome/browser/download/download_item_model.h"
29 #include "chrome/browser/download/download_manager.h" 29 #include "chrome/browser/download/download_manager.h"
30 #include "chrome/browser/page_info_window.h" 30 #include "chrome/browser/page_info_window.h"
31 #include "chrome/browser/prefs/pref_service.h" 31 #include "chrome/browser/prefs/pref_service.h"
32 #include "chrome/browser/prefs/scoped_user_pref_update.h"
32 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
33 #include "chrome/browser/tabs/tab_strip_model.h" 34 #include "chrome/browser/tabs/tab_strip_model.h"
34 #include "chrome/browser/themes/theme_service.h" 35 #include "chrome/browser/themes/theme_service.h"
35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" 36 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
36 #include "chrome/browser/ui/browser.h" 37 #include "chrome/browser/ui/browser.h"
37 #include "chrome/browser/ui/browser_dialogs.h" 38 #include "chrome/browser/ui/browser_dialogs.h"
38 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 39 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
39 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 40 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
40 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" 41 #include "chrome/browser/ui/gtk/about_chrome_dialog.h"
41 #include "chrome/browser/ui/gtk/accelerators_gtk.h" 42 #include "chrome/browser/ui/gtk/accelerators_gtk.h"
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 if (browser_->ShouldSaveWindowPlacement()) 1779 if (browser_->ShouldSaveWindowPlacement())
1779 browser_->SaveWindowPlacement(restored_bounds_, IsMaximized()); 1780 browser_->SaveWindowPlacement(restored_bounds_, IsMaximized());
1780 1781
1781 // We also need to save the placement for startup. 1782 // We also need to save the placement for startup.
1782 // This is a web of calls between views and delegates on Windows, but the 1783 // This is a web of calls between views and delegates on Windows, but the
1783 // crux of the logic follows. See also cocoa/browser_window_controller.mm. 1784 // crux of the logic follows. See also cocoa/browser_window_controller.mm.
1784 if (!browser_->profile()->GetPrefs()) 1785 if (!browser_->profile()->GetPrefs())
1785 return; 1786 return;
1786 1787
1787 std::string window_name = browser_->GetWindowPlacementKey(); 1788 std::string window_name = browser_->GetWindowPlacementKey();
1788 DictionaryValue* window_preferences = 1789 DictionaryPrefUpdate update(browser_->profile()->GetPrefs(),
1789 browser_->profile()->GetPrefs()-> 1790 window_name.c_str());
1790 GetMutableDictionary(window_name.c_str()); 1791 DictionaryValue* window_preferences = update.Get();
1791 // Note that we store left/top for consistency with Windows, but that we 1792 // Note that we store left/top for consistency with Windows, but that we
1792 // *don't* obey them; we only use them for computing width/height. See 1793 // *don't* obey them; we only use them for computing width/height. See
1793 // comments in SetGeometryHints(). 1794 // comments in SetGeometryHints().
1794 window_preferences->SetInteger("left", restored_bounds_.x()); 1795 window_preferences->SetInteger("left", restored_bounds_.x());
1795 window_preferences->SetInteger("top", restored_bounds_.y()); 1796 window_preferences->SetInteger("top", restored_bounds_.y());
1796 window_preferences->SetInteger("right", restored_bounds_.right()); 1797 window_preferences->SetInteger("right", restored_bounds_.right());
1797 window_preferences->SetInteger("bottom", restored_bounds_.bottom()); 1798 window_preferences->SetInteger("bottom", restored_bounds_.bottom());
1798 window_preferences->SetBoolean("maximized", IsMaximized()); 1799 window_preferences->SetBoolean("maximized", IsMaximized());
1799 1800
1800 scoped_ptr<WindowSizer::MonitorInfoProvider> monitor_info_provider( 1801 scoped_ptr<WindowSizer::MonitorInfoProvider> monitor_info_provider(
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 // special-case the ones where the custom frame should be used. These names 2290 // special-case the ones where the custom frame should be used. These names
2290 // are taken from the WMs' source code. 2291 // are taken from the WMs' source code.
2291 return (wm_name == "Blackbox" || 2292 return (wm_name == "Blackbox" ||
2292 wm_name == "compiz" || 2293 wm_name == "compiz" ||
2293 wm_name == "e16" || // Enlightenment DR16 2294 wm_name == "e16" || // Enlightenment DR16
2294 wm_name == "Metacity" || 2295 wm_name == "Metacity" ||
2295 wm_name == "Mutter" || 2296 wm_name == "Mutter" ||
2296 wm_name == "Openbox" || 2297 wm_name == "Openbox" ||
2297 wm_name == "Xfwm4"); 2298 wm_name == "Xfwm4");
2298 } 2299 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm ('k') | chrome/browser/ui/gtk/task_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698