| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 83 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
| 84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement
.h" | 84 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement
.h" |
| 85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" | 85 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" |
| 86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.
h" | 87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.
h" |
| 88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
| 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" | 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" |
| 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
| 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifi
er.h" |
| 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" | 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" |
| 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
| 96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" | 97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" |
| 97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" | 98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" |
| 98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" | 99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" |
| 99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" | 100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
| 100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" | 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" |
| 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
| 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData
.h" | 103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData
.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 using WebKit::WebFrame; | 184 using WebKit::WebFrame; |
| 184 using WebKit::WebHistoryItem; | 185 using WebKit::WebHistoryItem; |
| 185 using WebKit::WebIconURL; | 186 using WebKit::WebIconURL; |
| 186 using WebKit::WebImage; | 187 using WebKit::WebImage; |
| 187 using WebKit::WebInputElement; | 188 using WebKit::WebInputElement; |
| 188 using WebKit::WebMediaPlayer; | 189 using WebKit::WebMediaPlayer; |
| 189 using WebKit::WebMediaPlayerAction; | 190 using WebKit::WebMediaPlayerAction; |
| 190 using WebKit::WebMediaPlayerClient; | 191 using WebKit::WebMediaPlayerClient; |
| 191 using WebKit::WebNavigationPolicy; | 192 using WebKit::WebNavigationPolicy; |
| 192 using WebKit::WebNavigationType; | 193 using WebKit::WebNavigationType; |
| 194 using WebKit::WebNetworkStateNotifier; |
| 193 using WebKit::WebNode; | 195 using WebKit::WebNode; |
| 194 using WebKit::WebPlugin; | 196 using WebKit::WebPlugin; |
| 195 using WebKit::WebPluginContainer; | 197 using WebKit::WebPluginContainer; |
| 196 using WebKit::WebPluginDocument; | 198 using WebKit::WebPluginDocument; |
| 197 using WebKit::WebPluginParams; | 199 using WebKit::WebPluginParams; |
| 198 using WebKit::WebPoint; | 200 using WebKit::WebPoint; |
| 199 using WebKit::WebPopupMenuInfo; | 201 using WebKit::WebPopupMenuInfo; |
| 200 using WebKit::WebRange; | 202 using WebKit::WebRange; |
| 201 using WebKit::WebRect; | 203 using WebKit::WebRect; |
| 202 using WebKit::WebScriptSource; | 204 using WebKit::WebScriptSource; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 OnAccessibilityDoDefaultAction) | 669 OnAccessibilityDoDefaultAction) |
| 668 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityNotifications_ACK, | 670 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityNotifications_ACK, |
| 669 OnAccessibilityNotificationsAck) | 671 OnAccessibilityNotificationsAck) |
| 670 IPC_MESSAGE_HANDLER(ViewMsg_AsyncOpenFile_ACK, OnAsyncFileOpened) | 672 IPC_MESSAGE_HANDLER(ViewMsg_AsyncOpenFile_ACK, OnAsyncFileOpened) |
| 671 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerChannelCreated, | 673 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerChannelCreated, |
| 672 OnPpapiBrokerChannelCreated) | 674 OnPpapiBrokerChannelCreated) |
| 673 #if defined(OS_MACOSX) | 675 #if defined(OS_MACOSX) |
| 674 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) | 676 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) |
| 675 #endif | 677 #endif |
| 676 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) | 678 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) |
| 679 IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged) |
| 677 // TODO(viettrungluu): Move to a separate message filter. | 680 // TODO(viettrungluu): Move to a separate message filter. |
| 678 #if defined(ENABLE_FLAPPER_HACKS) | 681 #if defined(ENABLE_FLAPPER_HACKS) |
| 679 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK) | 682 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK) |
| 680 #endif | 683 #endif |
| 681 #if defined(OS_MACOSX) | 684 #if defined(OS_MACOSX) |
| 682 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) | 685 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) |
| 683 #endif | 686 #endif |
| 684 | 687 |
| 685 // Have the super handle all other messages. | 688 // Have the super handle all other messages. |
| 686 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) | 689 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) |
| (...skipping 3565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4252 } | 4255 } |
| 4253 #endif | 4256 #endif |
| 4254 | 4257 |
| 4255 void RenderView::OnContextMenuClosed( | 4258 void RenderView::OnContextMenuClosed( |
| 4256 const webkit_glue::CustomContextMenuContext& custom_context) { | 4259 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 4257 if (custom_context.is_pepper_menu) | 4260 if (custom_context.is_pepper_menu) |
| 4258 pepper_delegate_.OnContextMenuClosed(custom_context); | 4261 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 4259 else | 4262 else |
| 4260 context_menu_node_.reset(); | 4263 context_menu_node_.reset(); |
| 4261 } | 4264 } |
| 4265 |
| 4266 void RenderView::OnNetworkStateChanged(bool online) { |
| 4267 WebNetworkStateNotifier::setOnLine(online); |
| 4268 } |
| OLD | NEW |