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 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "content/public/common/page_zoom.h" | 31 #include "content/public/common/page_zoom.h" |
32 #include "content/public/common/referrer.h" | 32 #include "content/public/common/referrer.h" |
33 #include "content/public/common/renderer_preferences.h" | 33 #include "content/public/common/renderer_preferences.h" |
34 #include "content/public/common/stop_find_action.h" | 34 #include "content/public/common/stop_find_action.h" |
35 #include "content/public/common/top_controls_state.h" | 35 #include "content/public/common/top_controls_state.h" |
36 #include "content/public/renderer/render_view.h" | 36 #include "content/public/renderer/render_view.h" |
37 #include "content/renderer/mouse_lock_dispatcher.h" | 37 #include "content/renderer/mouse_lock_dispatcher.h" |
38 #include "content/renderer/render_view_pepper_helper.h" | 38 #include "content/renderer/render_view_pepper_helper.h" |
39 #include "content/renderer/render_widget.h" | 39 #include "content/renderer/render_widget.h" |
40 #include "content/renderer/renderer_webcookiejar_impl.h" | 40 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 41 #include "content/renderer/stats_collection_observer.h" |
41 #include "ipc/ipc_platform_file.h" | 42 #include "ipc/ipc_platform_file.h" |
42 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" | 43 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystem.h" |
43 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 44 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
46 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
47 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
48 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" | 49 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" |
49 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 50 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
50 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationType.h" | 51 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationType.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 class NavigationState; | 158 class NavigationState; |
158 class NotificationProvider; | 159 class NotificationProvider; |
159 class RenderViewObserver; | 160 class RenderViewObserver; |
160 class RenderViewTest; | 161 class RenderViewTest; |
161 class RendererAccessibility; | 162 class RendererAccessibility; |
162 class RendererDateTimePicker; | 163 class RendererDateTimePicker; |
163 class RendererPpapiHost; | 164 class RendererPpapiHost; |
164 class RendererWebColorChooserImpl; | 165 class RendererWebColorChooserImpl; |
165 class RenderWidgetFullscreenPepper; | 166 class RenderWidgetFullscreenPepper; |
166 class SpeechRecognitionDispatcher; | 167 class SpeechRecognitionDispatcher; |
| 168 class StatsCollectionController; |
167 class WebPluginDelegateProxy; | 169 class WebPluginDelegateProxy; |
168 struct CustomContextMenuContext; | 170 struct CustomContextMenuContext; |
169 struct FaviconURL; | 171 struct FaviconURL; |
170 struct FileChooserParams; | 172 struct FileChooserParams; |
171 struct RenderViewImplParams; | 173 struct RenderViewImplParams; |
172 | 174 |
173 #if defined(OS_ANDROID) | 175 #if defined(OS_ANDROID) |
174 class WebMediaPlayerProxyImplAndroid; | 176 class WebMediaPlayerProxyImplAndroid; |
175 #endif | 177 #endif |
176 | 178 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } | 262 } |
261 #endif | 263 #endif |
262 | 264 |
263 // Lazily initialize this view's BrowserPluginManager and return it. | 265 // Lazily initialize this view's BrowserPluginManager and return it. |
264 BrowserPluginManager* GetBrowserPluginManager(); | 266 BrowserPluginManager* GetBrowserPluginManager(); |
265 | 267 |
266 // Functions to add and remove observers for this object. | 268 // Functions to add and remove observers for this object. |
267 void AddObserver(RenderViewObserver* observer); | 269 void AddObserver(RenderViewObserver* observer); |
268 void RemoveObserver(RenderViewObserver* observer); | 270 void RemoveObserver(RenderViewObserver* observer); |
269 | 271 |
| 272 // Returns the StatsCollectionObserver associated with this view, or NULL |
| 273 // if one wasn't created; |
| 274 StatsCollectionObserver* GetStatsCollectionObserver() { |
| 275 return stats_collection_observer_.get(); |
| 276 } |
| 277 |
270 // Adds the given file chooser request to the file_chooser_completion_ queue | 278 // Adds the given file chooser request to the file_chooser_completion_ queue |
271 // (see that var for more) and requests the chooser be displayed if there are | 279 // (see that var for more) and requests the chooser be displayed if there are |
272 // no other waiting items in the queue. | 280 // no other waiting items in the queue. |
273 // | 281 // |
274 // Returns true if the chooser was successfully scheduled. False means we | 282 // Returns true if the chooser was successfully scheduled. False means we |
275 // didn't schedule anything. | 283 // didn't schedule anything. |
276 bool ScheduleFileChooser(const FileChooserParams& params, | 284 bool ScheduleFileChooser(const FileChooserParams& params, |
277 WebKit::WebFileChooserCompletion* completion); | 285 WebKit::WebFileChooserCompletion* completion); |
278 | 286 |
279 void LoadNavigationErrorPage( | 287 void LoadNavigationErrorPage( |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 PendingSnapshotMap pending_snapshots_; | 1523 PendingSnapshotMap pending_snapshots_; |
1516 | 1524 |
1517 // Allows to selectively disable partial buffer swap for this renderer's | 1525 // Allows to selectively disable partial buffer swap for this renderer's |
1518 // compositor. | 1526 // compositor. |
1519 bool allow_partial_swap_; | 1527 bool allow_partial_swap_; |
1520 | 1528 |
1521 // Allows JS to access DOM automation. The JS object is only exposed when the | 1529 // Allows JS to access DOM automation. The JS object is only exposed when the |
1522 // DOM automation bindings are enabled. | 1530 // DOM automation bindings are enabled. |
1523 scoped_ptr<DomAutomationController> dom_automation_controller_; | 1531 scoped_ptr<DomAutomationController> dom_automation_controller_; |
1524 | 1532 |
| 1533 // Allows JS to read out a variety of internal various metrics. The JS object |
| 1534 // is only exposed when the stats collection bindings are enabled. |
| 1535 scoped_ptr<StatsCollectionController> stats_collection_controller_; |
| 1536 |
1525 // This field stores drag/drop related info for the event that is currently | 1537 // This field stores drag/drop related info for the event that is currently |
1526 // being handled. If the current event results in starting a drag/drop | 1538 // being handled. If the current event results in starting a drag/drop |
1527 // session, this info is sent to the browser along with other drag/drop info. | 1539 // session, this info is sent to the browser along with other drag/drop info. |
1528 DragEventSourceInfo possible_drag_event_info_; | 1540 DragEventSourceInfo possible_drag_event_info_; |
1529 | 1541 |
1530 // NOTE: pepper_helper_ should be last member because its constructor calls | 1542 // NOTE: pepper_helper_ and stats_collection_observer_ should be the last |
1531 // AddObservers method of RenderViewImpl from c-tor. | 1543 // members because their constructors call the AddObservers method of |
| 1544 // RenderViewImpl. |
1532 scoped_ptr<RenderViewPepperHelper> pepper_helper_; | 1545 scoped_ptr<RenderViewPepperHelper> pepper_helper_; |
| 1546 scoped_ptr<StatsCollectionObserver> stats_collection_observer_; |
1533 | 1547 |
1534 // --------------------------------------------------------------------------- | 1548 // --------------------------------------------------------------------------- |
1535 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1549 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
1536 // sections rather than throwing it randomly at the end. If you're adding a | 1550 // sections rather than throwing it randomly at the end. If you're adding a |
1537 // bunch of stuff, you should probably create a helper class and put your | 1551 // bunch of stuff, you should probably create a helper class and put your |
1538 // data and methods on that to avoid bloating RenderView more. You can | 1552 // data and methods on that to avoid bloating RenderView more. You can |
1539 // use the Observer interface to filter IPC messages and receive frame change | 1553 // use the Observer interface to filter IPC messages and receive frame change |
1540 // notifications. | 1554 // notifications. |
1541 // --------------------------------------------------------------------------- | 1555 // --------------------------------------------------------------------------- |
1542 | 1556 |
1543 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1557 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1544 }; | 1558 }; |
1545 | 1559 |
1546 } // namespace content | 1560 } // namespace content |
1547 | 1561 |
1548 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1562 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |