| 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 "extensions/browser/app_window/app_window_geometry_cache.h" | 5 #include "extensions/browser/app_window/app_window_geometry_cache.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include <utility> | 9 #include <utility> |
| 8 | 10 |
| 9 #include "base/bind.h" | 11 #include "base/bind.h" |
| 10 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 11 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 12 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 14 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 13 #include "extensions/browser/extension_prefs.h" | 15 #include "extensions/browser/extension_prefs.h" |
| 14 #include "extensions/browser/extension_prefs_factory.h" | 16 #include "extensions/browser/extension_prefs_factory.h" |
| 15 #include "extensions/browser/extension_registry.h" | 17 #include "extensions/browser/extension_registry.h" |
| 16 #include "extensions/browser/extensions_browser_client.h" | 18 #include "extensions/browser/extensions_browser_client.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 window_data.screen_bounds.set_y(i); | 241 window_data.screen_bounds.set_y(i); |
| 240 if (stored_window->GetInteger("screen_bounds_w", &i)) | 242 if (stored_window->GetInteger("screen_bounds_w", &i)) |
| 241 window_data.screen_bounds.set_width(i); | 243 window_data.screen_bounds.set_width(i); |
| 242 if (stored_window->GetInteger("screen_bounds_h", &i)) | 244 if (stored_window->GetInteger("screen_bounds_h", &i)) |
| 243 window_data.screen_bounds.set_height(i); | 245 window_data.screen_bounds.set_height(i); |
| 244 if (stored_window->GetInteger("state", &i)) { | 246 if (stored_window->GetInteger("state", &i)) { |
| 245 window_data.window_state = static_cast<ui::WindowShowState>(i); | 247 window_data.window_state = static_cast<ui::WindowShowState>(i); |
| 246 } | 248 } |
| 247 std::string ts_as_string; | 249 std::string ts_as_string; |
| 248 if (stored_window->GetString("ts", &ts_as_string)) { | 250 if (stored_window->GetString("ts", &ts_as_string)) { |
| 249 int64 ts; | 251 int64_t ts; |
| 250 if (base::StringToInt64(ts_as_string, &ts)) { | 252 if (base::StringToInt64(ts_as_string, &ts)) { |
| 251 window_data.last_change = base::Time::FromInternalValue(ts); | 253 window_data.last_change = base::Time::FromInternalValue(ts); |
| 252 } | 254 } |
| 253 } | 255 } |
| 254 } | 256 } |
| 255 } | 257 } |
| 256 } | 258 } |
| 257 } | 259 } |
| 258 | 260 |
| 259 /////////////////////////////////////////////////////////////////////////////// | 261 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 300 |
| 299 void AppWindowGeometryCache::AddObserver(Observer* observer) { | 301 void AppWindowGeometryCache::AddObserver(Observer* observer) { |
| 300 observers_.AddObserver(observer); | 302 observers_.AddObserver(observer); |
| 301 } | 303 } |
| 302 | 304 |
| 303 void AppWindowGeometryCache::RemoveObserver(Observer* observer) { | 305 void AppWindowGeometryCache::RemoveObserver(Observer* observer) { |
| 304 observers_.RemoveObserver(observer); | 306 observers_.RemoveObserver(observer); |
| 305 } | 307 } |
| 306 | 308 |
| 307 } // namespace extensions | 309 } // namespace extensions |
| OLD | NEW |