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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 9416070: Move creation and ownership of HostZoomMap to content instead of having every embedder do this. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac/cros browsertests Created 8 years, 10 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) 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/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "ui/gfx/native_widget_types.h" 56 #include "ui/gfx/native_widget_types.h"
57 #include "webkit/fileapi/isolated_context.h" 57 #include "webkit/fileapi/isolated_context.h"
58 #include "webkit/glue/webaccessibility.h" 58 #include "webkit/glue/webaccessibility.h"
59 #include "webkit/glue/webdropdata.h" 59 #include "webkit/glue/webdropdata.h"
60 60
61 using base::TimeDelta; 61 using base::TimeDelta;
62 using content::BrowserContext; 62 using content::BrowserContext;
63 using content::BrowserMessageFilter; 63 using content::BrowserMessageFilter;
64 using content::BrowserThread; 64 using content::BrowserThread;
65 using content::DomOperationNotificationDetails; 65 using content::DomOperationNotificationDetails;
66 using content::HostZoomMap;
66 using content::RenderViewHostDelegate; 67 using content::RenderViewHostDelegate;
67 using content::SiteInstance; 68 using content::SiteInstance;
68 using content::UserMetricsAction; 69 using content::UserMetricsAction;
69 using WebKit::WebConsoleMessage; 70 using WebKit::WebConsoleMessage;
70 using WebKit::WebDragOperation; 71 using WebKit::WebDragOperation;
71 using WebKit::WebDragOperationNone; 72 using WebKit::WebDragOperationNone;
72 using WebKit::WebDragOperationsMask; 73 using WebKit::WebDragOperationsMask;
73 using WebKit::WebInputEvent; 74 using WebKit::WebInputEvent;
74 using WebKit::WebMediaPlayerAction; 75 using WebKit::WebMediaPlayerAction;
75 using WebKit::WebPluginAction; 76 using WebKit::WebPluginAction;
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 content::NotificationService::current()->Notify( 1487 content::NotificationService::current()->Notify(
1487 content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, 1488 content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
1488 content::Source<RenderViewHost>(this), 1489 content::Source<RenderViewHost>(this),
1489 content::Details<std::pair<int, Value*> >(&details)); 1490 content::Details<std::pair<int, Value*> >(&details));
1490 } 1491 }
1491 1492
1492 void RenderViewHost::OnDidZoomURL(double zoom_level, 1493 void RenderViewHost::OnDidZoomURL(double zoom_level,
1493 bool remember, 1494 bool remember,
1494 const GURL& url) { 1495 const GURL& url) {
1495 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>( 1496 HostZoomMapImpl* host_zoom_map = static_cast<HostZoomMapImpl*>(
1496 process()->GetBrowserContext()->GetHostZoomMap()); 1497 HostZoomMap::GetForBrowserContext(process()->GetBrowserContext()));
1497 if (remember) { 1498 if (remember) {
1498 host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level); 1499 host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level);
1499 } else { 1500 } else {
1500 host_zoom_map->SetTemporaryZoomLevel( 1501 host_zoom_map->SetTemporaryZoomLevel(
1501 process()->GetID(), routing_id(), zoom_level); 1502 process()->GetID(), routing_id(), zoom_level);
1502 } 1503 }
1503 } 1504 }
1504 1505
1505 void RenderViewHost::OnMediaNotification(int64 player_cookie, 1506 void RenderViewHost::OnMediaNotification(int64 player_cookie,
1506 bool has_video, 1507 bool has_video,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 // Whenever we change swap out state, we should not be waiting for 1592 // Whenever we change swap out state, we should not be waiting for
1592 // beforeunload or unload acks. We clear them here to be safe, since they 1593 // beforeunload or unload acks. We clear them here to be safe, since they
1593 // can cause navigations to be ignored in OnMsgNavigate. 1594 // can cause navigations to be ignored in OnMsgNavigate.
1594 is_waiting_for_beforeunload_ack_ = false; 1595 is_waiting_for_beforeunload_ack_ = false;
1595 is_waiting_for_unload_ack_ = false; 1596 is_waiting_for_unload_ack_ = false;
1596 } 1597 }
1597 1598
1598 void RenderViewHost::ClearPowerSaveBlockers() { 1599 void RenderViewHost::ClearPowerSaveBlockers() {
1599 STLDeleteValues(&power_save_blockers_); 1600 STLDeleteValues(&power_save_blockers_);
1600 } 1601 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/async_resource_handler.cc ('k') | content/browser/resource_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698