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 4899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4910 // it to the browser UI thread. Ignore the extra-messages. | 4910 // it to the browser UI thread. Ignore the extra-messages. |
4911 // TODO(jcivelli): http:/b/5793321 Implement a better fix, as detailed in bug. | 4911 // TODO(jcivelli): http:/b/5793321 Implement a better fix, as detailed in bug. |
4912 if (!external_popup_menu_) | 4912 if (!external_popup_menu_) |
4913 return; | 4913 return; |
4914 | 4914 |
4915 external_popup_menu_->DidSelectItems(canceled, selected_indices); | 4915 external_popup_menu_->DidSelectItems(canceled, selected_indices); |
4916 external_popup_menu_.reset(); | 4916 external_popup_menu_.reset(); |
4917 } | 4917 } |
4918 #endif | 4918 #endif |
4919 | 4919 |
4920 void RenderViewImpl::DidHideExternalPopupMenu() | |
4921 { | |
Robert Sesek
2014/03/20 15:06:04
nit: goes on previous line
tkent
2014/03/21 13:55:26
Done.
| |
4922 // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close | |
4923 // is called. Otherwise, createExternalPopupMenu() for new popup will fail. | |
4924 external_popup_menu_.reset(); | |
4925 } | |
4926 | |
4920 void RenderViewImpl::OnShowContextMenu(const gfx::Point& location) { | 4927 void RenderViewImpl::OnShowContextMenu(const gfx::Point& location) { |
4921 context_menu_source_type_ = ui::MENU_SOURCE_TOUCH_EDIT_MENU; | 4928 context_menu_source_type_ = ui::MENU_SOURCE_TOUCH_EDIT_MENU; |
4922 touch_editing_context_menu_location_ = location; | 4929 touch_editing_context_menu_location_ = location; |
4923 if (webview()) | 4930 if (webview()) |
4924 webview()->showContextMenu(); | 4931 webview()->showContextMenu(); |
4925 } | 4932 } |
4926 | 4933 |
4927 void RenderViewImpl::OnEnableViewSourceMode() { | 4934 void RenderViewImpl::OnEnableViewSourceMode() { |
4928 if (!webview()) | 4935 if (!webview()) |
4929 return; | 4936 return; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5104 for (size_t i = 0; i < icon_urls.size(); i++) { | 5111 for (size_t i = 0; i < icon_urls.size(); i++) { |
5105 WebURL url = icon_urls[i].iconURL(); | 5112 WebURL url = icon_urls[i].iconURL(); |
5106 if (!url.isEmpty()) | 5113 if (!url.isEmpty()) |
5107 urls.push_back(FaviconURL(url, | 5114 urls.push_back(FaviconURL(url, |
5108 ToFaviconType(icon_urls[i].iconType()))); | 5115 ToFaviconType(icon_urls[i].iconType()))); |
5109 } | 5116 } |
5110 SendUpdateFaviconURL(urls); | 5117 SendUpdateFaviconURL(urls); |
5111 } | 5118 } |
5112 | 5119 |
5113 } // namespace content | 5120 } // namespace content |
OLD | NEW |