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 4910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4921 // it to the browser UI thread. Ignore the extra-messages. | 4921 // it to the browser UI thread. Ignore the extra-messages. |
4922 // TODO(jcivelli): http:/b/5793321 Implement a better fix, as detailed in bug. | 4922 // TODO(jcivelli): http:/b/5793321 Implement a better fix, as detailed in bug. |
4923 if (!external_popup_menu_) | 4923 if (!external_popup_menu_) |
4924 return; | 4924 return; |
4925 | 4925 |
4926 external_popup_menu_->DidSelectItems(canceled, selected_indices); | 4926 external_popup_menu_->DidSelectItems(canceled, selected_indices); |
4927 external_popup_menu_.reset(); | 4927 external_popup_menu_.reset(); |
4928 } | 4928 } |
4929 #endif | 4929 #endif |
4930 | 4930 |
| 4931 void RenderViewImpl::DidHideExternalPopupMenu() |
| 4932 { |
| 4933 // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close |
| 4934 // is called. Otherwise, createExternalPopupMenu() for new popup will fail. |
| 4935 external_popup_menu_.reset(); |
| 4936 } |
| 4937 |
4931 void RenderViewImpl::OnShowContextMenu(const gfx::Point& location) { | 4938 void RenderViewImpl::OnShowContextMenu(const gfx::Point& location) { |
4932 context_menu_source_type_ = ui::MENU_SOURCE_TOUCH_EDIT_MENU; | 4939 context_menu_source_type_ = ui::MENU_SOURCE_TOUCH_EDIT_MENU; |
4933 touch_editing_context_menu_location_ = location; | 4940 touch_editing_context_menu_location_ = location; |
4934 if (webview()) | 4941 if (webview()) |
4935 webview()->showContextMenu(); | 4942 webview()->showContextMenu(); |
4936 } | 4943 } |
4937 | 4944 |
4938 void RenderViewImpl::OnEnableViewSourceMode() { | 4945 void RenderViewImpl::OnEnableViewSourceMode() { |
4939 if (!webview()) | 4946 if (!webview()) |
4940 return; | 4947 return; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5115 for (size_t i = 0; i < icon_urls.size(); i++) { | 5122 for (size_t i = 0; i < icon_urls.size(); i++) { |
5116 WebURL url = icon_urls[i].iconURL(); | 5123 WebURL url = icon_urls[i].iconURL(); |
5117 if (!url.isEmpty()) | 5124 if (!url.isEmpty()) |
5118 urls.push_back(FaviconURL(url, | 5125 urls.push_back(FaviconURL(url, |
5119 ToFaviconType(icon_urls[i].iconType()))); | 5126 ToFaviconType(icon_urls[i].iconType()))); |
5120 } | 5127 } |
5121 SendUpdateFaviconURL(urls); | 5128 SendUpdateFaviconURL(urls); |
5122 } | 5129 } |
5123 | 5130 |
5124 } // namespace content | 5131 } // namespace content |
OLD | NEW |