OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/zoom/zoom_controller.h" | 5 #include "chrome/browser/ui/zoom/zoom_controller.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/process/kill.h" | 8 #include "base/process/kill.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // zoom level will change the zoom level for this web_contents. | 98 // zoom level will change the zoom level for this web_contents. |
99 ZoomController::ZoomChangedEventData zoom_change_data( | 99 ZoomController::ZoomChangedEventData zoom_change_data( |
100 web_contents, | 100 web_contents, |
101 new_default_zoom_level, | 101 new_default_zoom_level, |
102 new_default_zoom_level, | 102 new_default_zoom_level, |
103 ZoomController::ZOOM_MODE_DEFAULT, | 103 ZoomController::ZOOM_MODE_DEFAULT, |
104 true); | 104 true); |
105 ZoomChangedWatcher zoom_change_watcher(web_contents, zoom_change_data); | 105 ZoomChangedWatcher zoom_change_watcher(web_contents, zoom_change_data); |
106 // TODO(wjmaclean): Convert this to call partition-specific zoom level prefs | 106 // TODO(wjmaclean): Convert this to call partition-specific zoom level prefs |
107 // when they become available. | 107 // when they become available. |
108 browser()->profile()->GetPrefs()->SetDouble(prefs::kDefaultZoomLevel, | 108 browser()->profile()->GetZoomLevelPrefs()->SetDouble(prefs::kDefaultZoomLevel, |
109 new_default_zoom_level); | 109 new_default_zoom_level); |
110 // Because this test relies on a round-trip IPC to/from the renderer process, | 110 // Because this test relies on a round-trip IPC to/from the renderer process, |
111 // we need to wait for it to propagate. | 111 // we need to wait for it to propagate. |
112 zoom_change_watcher.Wait(); | 112 zoom_change_watcher.Wait(); |
113 } | 113 } |
OLD | NEW |