OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/host_zoom_map_impl.h" | 5 #include "content/browser/host_zoom_map_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "content/browser/renderer_host/render_process_host_impl.h" | 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
13 #include "content/browser/renderer_host/render_view_host_impl.h" | 13 #include "content/browser/renderer_host/render_view_host_impl.h" |
14 #include "content/common/view_messages.h" | 14 #include "content/common/view_messages.h" |
15 #include "content/public/browser/browser_context.h" | 15 #include "content/public/browser/browser_context.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
18 #include "content/public/browser/notification_types.h" | 18 #include "content/public/browser/notification_types.h" |
19 #include "content/public/browser/resource_context.h" | 19 #include "content/public/browser/resource_context.h" |
20 #include "content/public/common/page_zoom.h" | 20 #include "content/public/common/page_zoom.h" |
21 #include "googleurl/src/gurl.h" | |
22 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
23 | 22 |
24 static const char* kHostZoomMapKeyName = "content_host_zoom_map"; | 23 static const char* kHostZoomMapKeyName = "content_host_zoom_map"; |
25 | 24 |
26 namespace content { | 25 namespace content { |
27 | 26 |
28 HostZoomMap* HostZoomMap::GetForBrowserContext(BrowserContext* context) { | 27 HostZoomMap* HostZoomMap::GetForBrowserContext(BrowserContext* context) { |
29 HostZoomMapImpl* rv = static_cast<HostZoomMapImpl*>( | 28 HostZoomMapImpl* rv = static_cast<HostZoomMapImpl*>( |
30 context->GetUserData(kHostZoomMapKeyName)); | 29 context->GetUserData(kHostZoomMapKeyName)); |
31 if (!rv) { | 30 if (!rv) { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 240 } |
242 default: | 241 default: |
243 NOTREACHED() << "Unexpected preference observed."; | 242 NOTREACHED() << "Unexpected preference observed."; |
244 } | 243 } |
245 } | 244 } |
246 | 245 |
247 HostZoomMapImpl::~HostZoomMapImpl() { | 246 HostZoomMapImpl::~HostZoomMapImpl() { |
248 } | 247 } |
249 | 248 |
250 } // namespace content | 249 } // namespace content |
OLD | NEW |