| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <blimp/engine/app/settings_manager.h> | 5 #include <blimp/engine/app/settings_manager.h> |
| 6 #include "content/public/browser/render_view_host.h" | 6 #include "content/public/browser/render_view_host.h" |
| 7 #include "content/public/common/web_preferences.h" | 7 #include "content/public/common/web_preferences.h" |
| 8 | 8 |
| 9 namespace blimp { | 9 namespace blimp { |
| 10 namespace engine { | 10 namespace engine { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 const EngineSettings& SettingsManager::GetEngineSettings() const { | 36 const EngineSettings& SettingsManager::GetEngineSettings() const { |
| 37 return settings_; | 37 return settings_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 void SettingsManager::UpdateEngineSettings(const EngineSettings& settings) { | 40 void SettingsManager::UpdateEngineSettings(const EngineSettings& settings) { |
| 41 EngineSettings old_settings = settings_; | 41 EngineSettings old_settings = settings_; |
| 42 settings_ = settings; | 42 settings_ = settings; |
| 43 | 43 |
| 44 if (settings_.record_whole_document != old_settings.record_whole_document) { | 44 if (settings_.record_whole_document != old_settings.record_whole_document) { |
| 45 // Notify the observers that the web preferences have changed. | 45 // Notify the observers that the web preferences have changed. |
| 46 FOR_EACH_OBSERVER(Observer, observer_list_, OnWebPreferencesChanged()); | 46 for (auto& observer : observer_list_) |
| 47 observer.OnWebPreferencesChanged(); |
| 47 } | 48 } |
| 48 } | 49 } |
| 49 | 50 |
| 50 } // namespace engine | 51 } // namespace engine |
| 51 } // namespace blimp | 52 } // namespace blimp |
| OLD | NEW |