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

Side by Side Diff: content/browser/host_zoom_map.cc

Issue 7065018: Fix HostZoomMap related crash from r86367. Re-enable PDFBrowserTest.Slow_Loading. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « chrome/test/plugin/pdf_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <cmath> 5 #include <cmath>
6 6
7 #include "content/browser/host_zoom_map.h" 7 #include "content/browser/host_zoom_map.h"
8 8
9 #include "base/string_piece.h" 9 #include "base/string_piece.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 if (level && i == temporary_zoom_levels_.size()) { 84 if (level && i == temporary_zoom_levels_.size()) {
85 TemporaryZoomLevel temp; 85 TemporaryZoomLevel temp;
86 temp.render_process_id = render_process_id; 86 temp.render_process_id = render_process_id;
87 temp.render_view_id = render_view_id; 87 temp.render_view_id = render_view_id;
88 temp.zoom_level = level; 88 temp.zoom_level = level;
89 temporary_zoom_levels_.push_back(temp); 89 temporary_zoom_levels_.push_back(temp);
90 } 90 }
91 } 91 }
92 92
93 std::string host;
93 NotificationService::current()->Notify(NotificationType::ZOOM_LEVEL_CHANGED, 94 NotificationService::current()->Notify(NotificationType::ZOOM_LEVEL_CHANGED,
94 Source<HostZoomMap>(this), 95 Source<HostZoomMap>(this),
95 NotificationService::NoDetails()); 96 Details<const std::string>(&host));
97
96 } 98 }
97 99
98 void HostZoomMap::Observe( 100 void HostZoomMap::Observe(
99 NotificationType type, 101 NotificationType type,
100 const NotificationSource& source, 102 const NotificationSource& source,
101 const NotificationDetails& details) { 103 const NotificationDetails& details) {
102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
103 105
104 switch (type.value) { 106 switch (type.value) {
105 case NotificationType::RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW: { 107 case NotificationType::RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW: {
(...skipping 10 matching lines...) Expand all
116 } 118 }
117 break; 119 break;
118 } 120 }
119 default: 121 default:
120 NOTREACHED() << "Unexpected preference observed."; 122 NOTREACHED() << "Unexpected preference observed.";
121 } 123 }
122 } 124 }
123 125
124 HostZoomMap::~HostZoomMap() { 126 HostZoomMap::~HostZoomMap() {
125 } 127 }
OLDNEW
« no previous file with comments | « chrome/test/plugin/pdf_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698