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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 305103003: Fix for 'Simple Adblock' extension crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jsbell's review comments Created 6 years, 6 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3209 matching lines...) Expand 10 before | Expand all | Expand 10 after
3220 // WebPluginDelegateProxy is responsible for figuring out if this event 3220 // WebPluginDelegateProxy is responsible for figuring out if this event
3221 // applies to it or not, so inform all the delegates. 3221 // applies to it or not, so inform all the delegates.
3222 std::set<WebPluginDelegateProxy*>::iterator plugin_it; 3222 std::set<WebPluginDelegateProxy*>::iterator plugin_it;
3223 for (plugin_it = plugin_delegates_.begin(); 3223 for (plugin_it = plugin_delegates_.begin();
3224 plugin_it != plugin_delegates_.end(); ++plugin_it) { 3224 plugin_it != plugin_delegates_.end(); ++plugin_it) {
3225 (*plugin_it)->ImeCompositionCompleted(text, plugin_id); 3225 (*plugin_it)->ImeCompositionCompleted(text, plugin_id);
3226 } 3226 }
3227 } 3227 }
3228 #endif // OS_MACOSX 3228 #endif // OS_MACOSX
3229 3229
3230 void RenderViewImpl::OnClose() {
3231 if (closing_)
3232 RenderThread::Get()->Send(new ViewHostMsg_Close_ACK(routing_id_));
3233 RenderWidget::OnClose();
3234 }
3235
3230 void RenderViewImpl::Close() { 3236 void RenderViewImpl::Close() {
3231 // We need to grab a pointer to the doomed WebView before we destroy it. 3237 // We need to grab a pointer to the doomed WebView before we destroy it.
3232 WebView* doomed = webview(); 3238 WebView* doomed = webview();
3233 RenderWidget::Close(); 3239 RenderWidget::Close();
3234 g_view_map.Get().erase(doomed); 3240 g_view_map.Get().erase(doomed);
3235 g_routing_id_view_map.Get().erase(routing_id_); 3241 g_routing_id_view_map.Get().erase(routing_id_);
3242 RenderThread::Get()->Send(new ViewHostMsg_Close_ACK(routing_id_));
3236 } 3243 }
3237 3244
3238 void RenderViewImpl::DidHandleKeyEvent() { 3245 void RenderViewImpl::DidHandleKeyEvent() {
3239 ClearEditCommands(); 3246 ClearEditCommands();
3240 } 3247 }
3241 3248
3242 bool RenderViewImpl::WillHandleMouseEvent(const blink::WebMouseEvent& event) { 3249 bool RenderViewImpl::WillHandleMouseEvent(const blink::WebMouseEvent& event) {
3243 possible_drag_event_info_.event_source = 3250 possible_drag_event_info_.event_source =
3244 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE; 3251 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE;
3245 possible_drag_event_info_.event_location = 3252 possible_drag_event_info_.event_location =
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
4052 std::vector<gfx::Size> sizes; 4059 std::vector<gfx::Size> sizes;
4053 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4060 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4054 if (!url.isEmpty()) 4061 if (!url.isEmpty())
4055 urls.push_back( 4062 urls.push_back(
4056 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4063 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4057 } 4064 }
4058 SendUpdateFaviconURL(urls); 4065 SendUpdateFaviconURL(urls);
4059 } 4066 }
4060 4067
4061 } // namespace content 4068 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698