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

Side by Side Diff: content/renderer/render_view.cc

Issue 7259004: Convert ViewMsg_NetworkStateChanged from routed -> control, allowing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Create a very simple observer, use it in BrowserProcess Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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"
94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h"
95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" 95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" 96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h"
98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" 97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" 98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" 99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" 100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData .h" 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData .h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 using WebKit::WebFrame; 183 using WebKit::WebFrame;
185 using WebKit::WebHistoryItem; 184 using WebKit::WebHistoryItem;
186 using WebKit::WebIconURL; 185 using WebKit::WebIconURL;
187 using WebKit::WebImage; 186 using WebKit::WebImage;
188 using WebKit::WebInputElement; 187 using WebKit::WebInputElement;
189 using WebKit::WebMediaPlayer; 188 using WebKit::WebMediaPlayer;
190 using WebKit::WebMediaPlayerAction; 189 using WebKit::WebMediaPlayerAction;
191 using WebKit::WebMediaPlayerClient; 190 using WebKit::WebMediaPlayerClient;
192 using WebKit::WebNavigationPolicy; 191 using WebKit::WebNavigationPolicy;
193 using WebKit::WebNavigationType; 192 using WebKit::WebNavigationType;
194 using WebKit::WebNetworkStateNotifier;
195 using WebKit::WebNode; 193 using WebKit::WebNode;
196 using WebKit::WebPlugin; 194 using WebKit::WebPlugin;
197 using WebKit::WebPluginContainer; 195 using WebKit::WebPluginContainer;
198 using WebKit::WebPluginDocument; 196 using WebKit::WebPluginDocument;
199 using WebKit::WebPluginParams; 197 using WebKit::WebPluginParams;
200 using WebKit::WebPoint; 198 using WebKit::WebPoint;
201 using WebKit::WebPopupMenuInfo; 199 using WebKit::WebPopupMenuInfo;
202 using WebKit::WebRange; 200 using WebKit::WebRange;
203 using WebKit::WebRect; 201 using WebKit::WebRect;
204 using WebKit::WebScriptSource; 202 using WebKit::WebScriptSource;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 OnAccessibilityDoDefaultAction) 670 OnAccessibilityDoDefaultAction)
673 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityNotifications_ACK, 671 IPC_MESSAGE_HANDLER(ViewMsg_AccessibilityNotifications_ACK,
674 OnAccessibilityNotificationsAck) 672 OnAccessibilityNotificationsAck)
675 IPC_MESSAGE_HANDLER(ViewMsg_AsyncOpenFile_ACK, OnAsyncFileOpened) 673 IPC_MESSAGE_HANDLER(ViewMsg_AsyncOpenFile_ACK, OnAsyncFileOpened)
676 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerChannelCreated, 674 IPC_MESSAGE_HANDLER(ViewMsg_PpapiBrokerChannelCreated,
677 OnPpapiBrokerChannelCreated) 675 OnPpapiBrokerChannelCreated)
678 #if defined(OS_MACOSX) 676 #if defined(OS_MACOSX)
679 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) 677 IPC_MESSAGE_HANDLER(ViewMsg_SelectPopupMenuItem, OnSelectPopupMenuItem)
680 #endif 678 #endif
681 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed) 679 IPC_MESSAGE_HANDLER(ViewMsg_ContextMenuClosed, OnContextMenuClosed)
682 IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged)
683 // TODO(viettrungluu): Move to a separate message filter. 680 // TODO(viettrungluu): Move to a separate message filter.
684 #if defined(ENABLE_FLAPPER_HACKS) 681 #if defined(ENABLE_FLAPPER_HACKS)
685 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK) 682 IPC_MESSAGE_HANDLER(PepperMsg_ConnectTcpACK, OnConnectTcpACK)
686 #endif 683 #endif
687 #if defined(OS_MACOSX) 684 #if defined(OS_MACOSX)
688 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize) 685 IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize)
689 #endif 686 #endif
690 687
691 // Have the super handle all other messages. 688 // Have the super handle all other messages.
692 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message)) 689 IPC_MESSAGE_UNHANDLED(handled = RenderWidget::OnMessageReceived(message))
(...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after
4252 } 4249 }
4253 #endif 4250 #endif
4254 4251
4255 void RenderView::OnContextMenuClosed( 4252 void RenderView::OnContextMenuClosed(
4256 const webkit_glue::CustomContextMenuContext& custom_context) { 4253 const webkit_glue::CustomContextMenuContext& custom_context) {
4257 if (custom_context.is_pepper_menu) 4254 if (custom_context.is_pepper_menu)
4258 pepper_delegate_.OnContextMenuClosed(custom_context); 4255 pepper_delegate_.OnContextMenuClosed(custom_context);
4259 else 4256 else
4260 context_menu_node_.reset(); 4257 context_menu_node_.reset();
4261 } 4258 }
4262
4263 void RenderView::OnNetworkStateChanged(bool online) {
4264 WebNetworkStateNotifier::setOnLine(online);
4265 }
OLDNEW
« content/renderer/render_thread.cc ('K') | « content/renderer/render_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698