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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 #include "content/renderer/media/webmediaplayer_ms.h" | 105 #include "content/renderer/media/webmediaplayer_ms.h" |
106 #include "content/renderer/media/webmediaplayer_params.h" | 106 #include "content/renderer/media/webmediaplayer_params.h" |
107 #include "content/renderer/mhtml_generator.h" | 107 #include "content/renderer/mhtml_generator.h" |
108 #include "content/renderer/notification_provider.h" | 108 #include "content/renderer/notification_provider.h" |
109 #include "content/renderer/render_frame_impl.h" | 109 #include "content/renderer/render_frame_impl.h" |
110 #include "content/renderer/render_process.h" | 110 #include "content/renderer/render_process.h" |
111 #include "content/renderer/render_thread_impl.h" | 111 #include "content/renderer/render_thread_impl.h" |
112 #include "content/renderer/render_view_impl_params.h" | 112 #include "content/renderer/render_view_impl_params.h" |
113 #include "content/renderer/render_view_mouse_lock_dispatcher.h" | 113 #include "content/renderer/render_view_mouse_lock_dispatcher.h" |
114 #include "content/renderer/render_widget_fullscreen_pepper.h" | 114 #include "content/renderer/render_widget_fullscreen_pepper.h" |
115 #include "content/renderer/renderer_date_time_picker.h" | |
116 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 115 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
117 #include "content/renderer/renderer_webcolorchooser_impl.h" | 116 #include "content/renderer/renderer_webcolorchooser_impl.h" |
118 #include "content/renderer/resizing_mode_selector.h" | 117 #include "content/renderer/resizing_mode_selector.h" |
119 #include "content/renderer/savable_resources.h" | 118 #include "content/renderer/savable_resources.h" |
120 #include "content/renderer/shared_worker_repository.h" | 119 #include "content/renderer/shared_worker_repository.h" |
121 #include "content/renderer/speech_recognition_dispatcher.h" | 120 #include "content/renderer/speech_recognition_dispatcher.h" |
122 #include "content/renderer/stats_collection_controller.h" | 121 #include "content/renderer/stats_collection_controller.h" |
123 #include "content/renderer/stats_collection_observer.h" | 122 #include "content/renderer/stats_collection_observer.h" |
124 #include "content/renderer/text_input_client_observer.h" | 123 #include "content/renderer/text_input_client_observer.h" |
125 #include "content/renderer/v8_value_converter_impl.h" | 124 #include "content/renderer/v8_value_converter_impl.h" |
(...skipping 6017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6143 // Remove the content highlighting if any. | 6142 // Remove the content highlighting if any. |
6144 scheduleComposite(); | 6143 scheduleComposite(); |
6145 | 6144 |
6146 if (!intent.is_empty()) | 6145 if (!intent.is_empty()) |
6147 Send(new ViewHostMsg_StartContentIntent(routing_id_, intent)); | 6146 Send(new ViewHostMsg_StartContentIntent(routing_id_, intent)); |
6148 } | 6147 } |
6149 | 6148 |
6150 bool RenderViewImpl::openDateTimeChooser( | 6149 bool RenderViewImpl::openDateTimeChooser( |
6151 const blink::WebDateTimeChooserParams& params, | 6150 const blink::WebDateTimeChooserParams& params, |
6152 blink::WebDateTimeChooserCompletion* completion) { | 6151 blink::WebDateTimeChooserCompletion* completion) { |
| 6152 // JavaScript may try to open a date time chooser while one is already open. |
| 6153 if (date_time_picker_client_) |
| 6154 return false; |
6153 date_time_picker_client_.reset( | 6155 date_time_picker_client_.reset( |
6154 new RendererDateTimePicker(this, params, completion)); | 6156 new RendererDateTimePicker(this, params, completion)); |
6155 return date_time_picker_client_->Open(); | 6157 return date_time_picker_client_->Open(); |
6156 } | 6158 } |
6157 | 6159 |
| 6160 #if defined(OS_ANDROID) |
| 6161 void RenderViewImpl::DismissDateTimeDialog() { |
| 6162 DCHECK(date_time_picker_client_); |
| 6163 date_time_picker_client_.reset(NULL); |
| 6164 } |
| 6165 #endif |
| 6166 |
6158 WebMediaPlayer* RenderViewImpl::CreateAndroidWebMediaPlayer( | 6167 WebMediaPlayer* RenderViewImpl::CreateAndroidWebMediaPlayer( |
6159 WebFrame* frame, | 6168 WebFrame* frame, |
6160 const blink::WebURL& url, | 6169 const blink::WebURL& url, |
6161 WebMediaPlayerClient* client) { | 6170 WebMediaPlayerClient* client) { |
6162 GpuChannelHost* gpu_channel_host = | 6171 GpuChannelHost* gpu_channel_host = |
6163 RenderThreadImpl::current()->EstablishGpuChannelSync( | 6172 RenderThreadImpl::current()->EstablishGpuChannelSync( |
6164 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); | 6173 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); |
6165 if (!gpu_channel_host) { | 6174 if (!gpu_channel_host) { |
6166 LOG(ERROR) << "Failed to establish GPU channel for media player"; | 6175 LOG(ERROR) << "Failed to establish GPU channel for media player"; |
6167 return NULL; | 6176 return NULL; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6447 for (size_t i = 0; i < icon_urls.size(); i++) { | 6456 for (size_t i = 0; i < icon_urls.size(); i++) { |
6448 WebURL url = icon_urls[i].iconURL(); | 6457 WebURL url = icon_urls[i].iconURL(); |
6449 if (!url.isEmpty()) | 6458 if (!url.isEmpty()) |
6450 urls.push_back(FaviconURL(url, | 6459 urls.push_back(FaviconURL(url, |
6451 ToFaviconType(icon_urls[i].iconType()))); | 6460 ToFaviconType(icon_urls[i].iconType()))); |
6452 } | 6461 } |
6453 SendUpdateFaviconURL(urls); | 6462 SendUpdateFaviconURL(urls); |
6454 } | 6463 } |
6455 | 6464 |
6456 } // namespace content | 6465 } // namespace content |
OLD | NEW |