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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 8919017: Split UserMetrics into API vs. implementation. Move API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Version for commit (merged again). Created 9 years 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/browser/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "content/browser/child_process_security_policy.h" 22 #include "content/browser/child_process_security_policy.h"
23 #include "content/browser/cross_site_request_manager.h" 23 #include "content/browser/cross_site_request_manager.h"
24 #include "content/browser/host_zoom_map.h" 24 #include "content/browser/host_zoom_map.h"
25 #include "content/browser/in_process_webkit/session_storage_namespace.h" 25 #include "content/browser/in_process_webkit/session_storage_namespace.h"
26 #include "content/browser/power_save_blocker.h" 26 #include "content/browser/power_save_blocker.h"
27 #include "content/browser/renderer_host/render_process_host_impl.h" 27 #include "content/browser/renderer_host/render_process_host_impl.h"
28 #include "content/browser/renderer_host/render_view_host_delegate.h" 28 #include "content/browser/renderer_host/render_view_host_delegate.h"
29 #include "content/browser/renderer_host/render_widget_host.h" 29 #include "content/browser/renderer_host/render_widget_host.h"
30 #include "content/browser/renderer_host/render_widget_host_view.h" 30 #include "content/browser/renderer_host/render_widget_host_view.h"
31 #include "content/browser/site_instance.h" 31 #include "content/browser/site_instance.h"
32 #include "content/browser/user_metrics.h"
33 #include "content/common/desktop_notification_messages.h" 32 #include "content/common/desktop_notification_messages.h"
34 #include "content/common/drag_messages.h" 33 #include "content/common/drag_messages.h"
35 #include "content/common/speech_input_messages.h" 34 #include "content/common/speech_input_messages.h"
36 #include "content/common/swapped_out_messages.h" 35 #include "content/common/swapped_out_messages.h"
37 #include "content/common/view_messages.h" 36 #include "content/common/view_messages.h"
38 #include "content/public/browser/content_browser_client.h" 37 #include "content/public/browser/content_browser_client.h"
39 #include "content/public/browser/native_web_keyboard_event.h" 38 #include "content/public/browser/native_web_keyboard_event.h"
40 #include "content/public/browser/notification_details.h" 39 #include "content/public/browser/notification_details.h"
41 #include "content/public/browser/notification_service.h" 40 #include "content/public/browser/notification_service.h"
42 #include "content/public/browser/notification_types.h" 41 #include "content/public/browser/notification_types.h"
43 #include "content/public/browser/render_view_host_observer.h" 42 #include "content/public/browser/render_view_host_observer.h"
43 #include "content/public/browser/user_metrics.h"
44 #include "content/public/common/bindings_policy.h" 44 #include "content/public/common/bindings_policy.h"
45 #include "content/public/common/content_constants.h" 45 #include "content/public/common/content_constants.h"
46 #include "content/public/common/result_codes.h" 46 #include "content/public/common/result_codes.h"
47 #include "content/public/common/url_constants.h" 47 #include "content/public/common/url_constants.h"
48 #include "net/base/net_util.h" 48 #include "net/base/net_util.h"
49 #include "net/url_request/url_request_context_getter.h" 49 #include "net/url_request/url_request_context_getter.h"
50 #include "third_party/skia/include/core/SkBitmap.h" 50 #include "third_party/skia/include/core/SkBitmap.h"
51 #include "ui/gfx/native_widget_types.h" 51 #include "ui/gfx/native_widget_types.h"
52 #include "webkit/glue/context_menu.h" 52 #include "webkit/glue/context_menu.h"
53 #include "webkit/glue/webaccessibility.h" 53 #include "webkit/glue/webaccessibility.h"
54 #include "webkit/glue/webdropdata.h" 54 #include "webkit/glue/webdropdata.h"
55 55
56 using base::TimeDelta; 56 using base::TimeDelta;
57 using content::BrowserThread; 57 using content::BrowserThread;
58 using content::UserMetricsAction;
58 using WebKit::WebConsoleMessage; 59 using WebKit::WebConsoleMessage;
59 using WebKit::WebDragOperation; 60 using WebKit::WebDragOperation;
60 using WebKit::WebDragOperationNone; 61 using WebKit::WebDragOperationNone;
61 using WebKit::WebDragOperationsMask; 62 using WebKit::WebDragOperationsMask;
62 using WebKit::WebInputEvent; 63 using WebKit::WebInputEvent;
63 using WebKit::WebMediaPlayerAction; 64 using WebKit::WebMediaPlayerAction;
64 65
65 namespace { 66 namespace {
66 67
67 // Delay to wait on closing the tab for a beforeunload/unload handler to fire. 68 // Delay to wait on closing the tab for a beforeunload/unload handler to fire.
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 #endif 736 #endif
736 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 737 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
737 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend) 738 IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
738 // Have the super handle all other messages. 739 // Have the super handle all other messages.
739 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) 740 IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg))
740 IPC_END_MESSAGE_MAP_EX() 741 IPC_END_MESSAGE_MAP_EX()
741 742
742 if (!msg_is_ok) { 743 if (!msg_is_ok) {
743 // The message had a handler, but its de-serialization failed. 744 // The message had a handler, but its de-serialization failed.
744 // Kill the renderer. 745 // Kill the renderer.
745 UserMetrics::RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); 746 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVH"));
746 process()->ReceivedBadMessage(); 747 process()->ReceivedBadMessage();
747 } 748 }
748 749
749 return handled; 750 return handled;
750 } 751 }
751 752
752 void RenderViewHost::Shutdown() { 753 void RenderViewHost::Shutdown() {
753 // If we are being run modally (see RunModal), then we need to cleanup. 754 // If we are being run modally (see RunModal), then we need to cleanup.
754 if (run_modal_reply_msg_) { 755 if (run_modal_reply_msg_) {
755 Send(run_modal_reply_msg_); 756 Send(run_modal_reply_msg_);
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 1523
1523 void RenderViewHost::OnWebUISend(const GURL& source_url, 1524 void RenderViewHost::OnWebUISend(const GURL& source_url,
1524 const std::string& name, 1525 const std::string& name,
1525 const base::ListValue& args) { 1526 const base::ListValue& args) {
1526 delegate_->WebUISend(this, source_url, name, args); 1527 delegate_->WebUISend(this, source_url, name, args);
1527 } 1528 }
1528 1529
1529 void RenderViewHost::ClearPowerSaveBlockers() { 1530 void RenderViewHost::ClearPowerSaveBlockers() {
1530 STLDeleteValues(&power_save_blockers_); 1531 STLDeleteValues(&power_save_blockers_);
1531 } 1532 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698