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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11783088: Split Date/Time picker values from IME processing since date/time related form values have been com… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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
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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 30 matching lines...) Expand all
41 #include "content/common/browser_plugin_messages.h" 41 #include "content/common/browser_plugin_messages.h"
42 #include "content/common/icon_messages.h" 42 #include "content/common/icon_messages.h"
43 #include "content/common/intents_messages.h" 43 #include "content/common/intents_messages.h"
44 #include "content/common/ssl_status_serialization.h" 44 #include "content/common/ssl_status_serialization.h"
45 #include "content/common/view_messages.h" 45 #include "content/common/view_messages.h"
46 #include "content/port/browser/render_view_host_delegate_view.h" 46 #include "content/port/browser/render_view_host_delegate_view.h"
47 #include "content/port/browser/render_widget_host_view_port.h" 47 #include "content/port/browser/render_widget_host_view_port.h"
48 #include "content/public/browser/browser_context.h" 48 #include "content/public/browser/browser_context.h"
49 #include "content/public/browser/color_chooser.h" 49 #include "content/public/browser/color_chooser.h"
50 #include "content/public/browser/content_browser_client.h" 50 #include "content/public/browser/content_browser_client.h"
51 #include "content/public/browser/date_time_chooser.h"
51 #include "content/public/browser/devtools_agent_host.h" 52 #include "content/public/browser/devtools_agent_host.h"
52 #include "content/public/browser/download_manager.h" 53 #include "content/public/browser/download_manager.h"
53 #include "content/public/browser/download_url_parameters.h" 54 #include "content/public/browser/download_url_parameters.h"
54 #include "content/public/browser/invalidate_type.h" 55 #include "content/public/browser/invalidate_type.h"
55 #include "content/public/browser/javascript_dialogs.h" 56 #include "content/public/browser/javascript_dialogs.h"
56 #include "content/public/browser/load_from_memory_cache_details.h" 57 #include "content/public/browser/load_from_memory_cache_details.h"
57 #include "content/public/browser/load_notification_details.h" 58 #include "content/public/browser/load_notification_details.h"
58 #include "content/public/browser/navigation_details.h" 59 #include "content/public/browser/navigation_details.h"
59 #include "content/public/browser/notification_details.h" 60 #include "content/public/browser/notification_details.h"
60 #include "content/public/browser/notification_service.h" 61 #include "content/public/browser/notification_service.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) 727 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits)
727 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL) 728 IPC_MESSAGE_HANDLER(ViewHostMsg_SaveURLAs, OnSaveURL)
728 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) 729 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory)
729 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) 730 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory)
730 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, 731 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler,
731 OnRegisterProtocolHandler) 732 OnRegisterProtocolHandler)
732 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) 733 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
733 #if defined(OS_ANDROID) 734 #if defined(OS_ANDROID)
734 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply, 735 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
735 OnFindMatchRectsReply) 736 OnFindMatchRectsReply)
737 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
738 OnOpenDateTimeDialog)
736 #endif 739 #endif
737 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin) 740 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
738 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 741 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
739 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser) 742 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser)
740 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser) 743 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser)
741 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser, 744 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser,
742 OnSetSelectedColorInColorChooser) 745 OnSetSelectedColorInColorChooser)
743 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung) 746 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung)
744 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) 747 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
745 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission, 748 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 Source<WebContents>(opener_)); 1185 Source<WebContents>(opener_));
1183 } 1186 }
1184 1187
1185 registrar_.Add(this, 1188 registrar_.Add(this,
1186 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1189 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1187 NotificationService::AllBrowserContextsAndSources()); 1190 NotificationService::AllBrowserContextsAndSources());
1188 #if defined(ENABLE_JAVA_BRIDGE) 1191 #if defined(ENABLE_JAVA_BRIDGE)
1189 java_bridge_dispatcher_host_manager_.reset( 1192 java_bridge_dispatcher_host_manager_.reset(
1190 new JavaBridgeDispatcherHostManager(this)); 1193 new JavaBridgeDispatcherHostManager(this));
1191 #endif 1194 #endif
1195
1196 #if defined(OS_ANDROID)
1197 date_time_chooser_.reset(DateTimeChooser::Create());
bulach 2013/01/10 15:58:35 nit: unindent
Miguel Garcia 2013/01/11 14:59:37 Done.
1198 #endif
1192 } 1199 }
1193 1200
1194 void WebContentsImpl::OnWebContentsDestroyed(WebContents* web_contents) { 1201 void WebContentsImpl::OnWebContentsDestroyed(WebContents* web_contents) {
1195 // Clear the opener if it has been closed. 1202 // Clear the opener if it has been closed.
1196 if (web_contents == opener_) { 1203 if (web_contents == opener_) {
1197 registrar_.Remove(this, NOTIFICATION_WEB_CONTENTS_DESTROYED, 1204 registrar_.Remove(this, NOTIFICATION_WEB_CONTENTS_DESTROYED,
1198 Source<WebContents>(opener_)); 1205 Source<WebContents>(opener_));
1199 opener_ = NULL; 1206 opener_ = NULL;
1200 } 1207 }
1201 } 1208 }
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 } 2271 }
2265 2272
2266 #if defined(OS_ANDROID) 2273 #if defined(OS_ANDROID)
2267 void WebContentsImpl::OnFindMatchRectsReply( 2274 void WebContentsImpl::OnFindMatchRectsReply(
2268 int version, 2275 int version,
2269 const std::vector<gfx::RectF>& rects, 2276 const std::vector<gfx::RectF>& rects,
2270 const gfx::RectF& active_rect) { 2277 const gfx::RectF& active_rect) {
2271 if (delegate_) 2278 if (delegate_)
2272 delegate_->FindMatchRectsReply(this, version, rects, active_rect); 2279 delegate_->FindMatchRectsReply(this, version, rects, active_rect);
2273 } 2280 }
2281
2282 void WebContentsImpl::OnOpenDateTimeDialog(int type, const std::string& value) {
2283 if (date_time_chooser_ != NULL)
bulach 2013/01/10 15:58:35 can this ever be null?
Miguel Garcia 2013/01/11 14:59:37 Well not right now since this call is compiled out
2284 date_time_chooser_->ShowDialog(
2285 GetContentNativeView(), GetRenderViewHost(), type, value);
2286 }
2287
2274 #endif 2288 #endif
2275 2289
2276 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) { 2290 void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path) {
2277 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2291 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2278 PluginCrashed(plugin_path)); 2292 PluginCrashed(plugin_path));
2279 } 2293 }
2280 2294
2281 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url, 2295 void WebContentsImpl::OnAppCacheAccessed(const GURL& manifest_url,
2282 bool blocked_by_policy) { 2296 bool blocked_by_policy) {
2283 // Notify observers about navigation. 2297 // Notify observers about navigation.
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
3398 3412
3399 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { 3413 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() {
3400 return browser_plugin_guest_.get(); 3414 return browser_plugin_guest_.get();
3401 } 3415 }
3402 3416
3403 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { 3417 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() {
3404 return browser_plugin_embedder_.get(); 3418 return browser_plugin_embedder_.get();
3405 } 3419 }
3406 3420
3407 } // namespace content 3421 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698