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/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 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/google/google_util.h" | |
jam
2011/07/19 23:06:54
you're going to get a deps failure for including c
gshires
2011/07/20 13:48:43
Done.
jam
2011/07/20 15:49:27
thanks!
| |
18 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/common/url_constants.h" | |
19 #include "content/browser/browser_message_filter.h" | 21 #include "content/browser/browser_message_filter.h" |
20 #include "content/browser/child_process_security_policy.h" | 22 #include "content/browser/child_process_security_policy.h" |
21 #include "content/browser/content_browser_client.h" | 23 #include "content/browser/content_browser_client.h" |
22 #include "content/browser/cross_site_request_manager.h" | 24 #include "content/browser/cross_site_request_manager.h" |
23 #include "content/browser/host_zoom_map.h" | 25 #include "content/browser/host_zoom_map.h" |
24 #include "content/browser/in_process_webkit/session_storage_namespace.h" | 26 #include "content/browser/in_process_webkit/session_storage_namespace.h" |
25 #include "content/browser/renderer_host/render_process_host.h" | 27 #include "content/browser/renderer_host/render_process_host.h" |
26 #include "content/browser/renderer_host/render_view_host_delegate.h" | 28 #include "content/browser/renderer_host/render_view_host_delegate.h" |
27 #include "content/browser/renderer_host/render_view_host_observer.h" | 29 #include "content/browser/renderer_host/render_view_host_observer.h" |
28 #include "content/browser/renderer_host/render_widget_host.h" | 30 #include "content/browser/renderer_host/render_widget_host.h" |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 void RenderViewHost::Delete() { | 506 void RenderViewHost::Delete() { |
505 Send(new ViewMsg_Delete(routing_id())); | 507 Send(new ViewMsg_Delete(routing_id())); |
506 UserMetrics::RecordAction(UserMetricsAction("DeleteSelection")); | 508 UserMetrics::RecordAction(UserMetricsAction("DeleteSelection")); |
507 } | 509 } |
508 | 510 |
509 void RenderViewHost::SelectAll() { | 511 void RenderViewHost::SelectAll() { |
510 Send(new ViewMsg_SelectAll(routing_id())); | 512 Send(new ViewMsg_SelectAll(routing_id())); |
511 UserMetrics::RecordAction(UserMetricsAction("SelectAll")); | 513 UserMetrics::RecordAction(UserMetricsAction("SelectAll")); |
512 } | 514 } |
513 | 515 |
516 void RenderViewHost::SpeechInputAbout() { | |
517 GURL about_url(chrome::kSpeechInputAboutURL); | |
518 GURL localized_about_url = google_util::AppendGoogleLocaleParam(about_url); | |
519 // Open URL with no referrer field (because user clicked on menu item). | |
520 delegate_->RequestOpenURL(localized_about_url, GURL(), NEW_FOREGROUND_TAB); | |
521 } | |
522 | |
514 void RenderViewHost::JavaScriptDialogClosed(IPC::Message* reply_msg, | 523 void RenderViewHost::JavaScriptDialogClosed(IPC::Message* reply_msg, |
515 bool success, | 524 bool success, |
516 const string16& user_input) { | 525 const string16& user_input) { |
517 process()->set_ignore_input_events(false); | 526 process()->set_ignore_input_events(false); |
518 bool is_waiting = | 527 bool is_waiting = |
519 is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_; | 528 is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_; |
520 if (is_waiting) | 529 if (is_waiting) |
521 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); | 530 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); |
522 | 531 |
523 ViewHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, | 532 ViewHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1313 if (view) { | 1322 if (view) { |
1314 view->ShowPopupMenu(params.bounds, | 1323 view->ShowPopupMenu(params.bounds, |
1315 params.item_height, | 1324 params.item_height, |
1316 params.item_font_size, | 1325 params.item_font_size, |
1317 params.selected_item, | 1326 params.selected_item, |
1318 params.popup_items, | 1327 params.popup_items, |
1319 params.right_aligned); | 1328 params.right_aligned); |
1320 } | 1329 } |
1321 } | 1330 } |
1322 #endif | 1331 #endif |
OLD | NEW |