| 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/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 3208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3219 // WebPluginDelegateProxy is responsible for figuring out if this event | 3219 // WebPluginDelegateProxy is responsible for figuring out if this event |
| 3220 // applies to it or not, so inform all the delegates. | 3220 // applies to it or not, so inform all the delegates. |
| 3221 std::set<WebPluginDelegateProxy*>::iterator plugin_it; | 3221 std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
| 3222 for (plugin_it = plugin_delegates_.begin(); | 3222 for (plugin_it = plugin_delegates_.begin(); |
| 3223 plugin_it != plugin_delegates_.end(); ++plugin_it) { | 3223 plugin_it != plugin_delegates_.end(); ++plugin_it) { |
| 3224 (*plugin_it)->ImeCompositionCompleted(text, plugin_id); | 3224 (*plugin_it)->ImeCompositionCompleted(text, plugin_id); |
| 3225 } | 3225 } |
| 3226 } | 3226 } |
| 3227 #endif // OS_MACOSX | 3227 #endif // OS_MACOSX |
| 3228 | 3228 |
| 3229 void RenderViewImpl::OnClose() { |
| 3230 if (closing_) |
| 3231 RenderThread::Get()->Send(new ViewHostMsg_Close_ACK(routing_id_)); |
| 3232 RenderWidget::OnClose(); |
| 3233 } |
| 3234 |
| 3229 void RenderViewImpl::Close() { | 3235 void RenderViewImpl::Close() { |
| 3230 // We need to grab a pointer to the doomed WebView before we destroy it. | 3236 // We need to grab a pointer to the doomed WebView before we destroy it. |
| 3231 WebView* doomed = webview(); | 3237 WebView* doomed = webview(); |
| 3232 RenderWidget::Close(); | 3238 RenderWidget::Close(); |
| 3233 g_view_map.Get().erase(doomed); | 3239 g_view_map.Get().erase(doomed); |
| 3234 g_routing_id_view_map.Get().erase(routing_id_); | 3240 g_routing_id_view_map.Get().erase(routing_id_); |
| 3241 RenderThread::Get()->Send(new ViewHostMsg_Close_ACK(routing_id_)); |
| 3235 } | 3242 } |
| 3236 | 3243 |
| 3237 void RenderViewImpl::DidHandleKeyEvent() { | 3244 void RenderViewImpl::DidHandleKeyEvent() { |
| 3238 ClearEditCommands(); | 3245 ClearEditCommands(); |
| 3239 } | 3246 } |
| 3240 | 3247 |
| 3241 bool RenderViewImpl::WillHandleMouseEvent(const blink::WebMouseEvent& event) { | 3248 bool RenderViewImpl::WillHandleMouseEvent(const blink::WebMouseEvent& event) { |
| 3242 possible_drag_event_info_.event_source = | 3249 possible_drag_event_info_.event_source = |
| 3243 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE; | 3250 ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE; |
| 3244 possible_drag_event_info_.event_location = | 3251 possible_drag_event_info_.event_location = |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4043 std::vector<gfx::Size> sizes; | 4050 std::vector<gfx::Size> sizes; |
| 4044 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4051 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4045 if (!url.isEmpty()) | 4052 if (!url.isEmpty()) |
| 4046 urls.push_back( | 4053 urls.push_back( |
| 4047 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4054 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4048 } | 4055 } |
| 4049 SendUpdateFaviconURL(urls); | 4056 SendUpdateFaviconURL(urls); |
| 4050 } | 4057 } |
| 4051 | 4058 |
| 4052 } // namespace content | 4059 } // namespace content |
| OLD | NEW |