| 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 #include "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 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/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
| 15 #include "base/command_line.h" |
| 15 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
| 16 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 17 #include "base/string_util.h" | 18 #include "base/string_util.h" |
| 18 #include "base/time.h" | 19 #include "base/time.h" |
| 19 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 20 #include "base/values.h" | 21 #include "base/values.h" |
| 21 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 22 #include "content/browser/child_process_security_policy_impl.h" | 23 #include "content/browser/child_process_security_policy_impl.h" |
| 23 #include "content/browser/cross_site_request_manager.h" | 24 #include "content/browser/cross_site_request_manager.h" |
| 24 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 25 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 #if defined(OS_ANDROID) | 503 #if defined(OS_ANDROID) |
| 503 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, | 504 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, |
| 504 float x, | 505 float x, |
| 505 float y) { | 506 float y) { |
| 506 Send(new ViewMsg_ActivateNearestFindResult(GetRoutingID(), request_id, x, y)); | 507 Send(new ViewMsg_ActivateNearestFindResult(GetRoutingID(), request_id, x, y)); |
| 507 } | 508 } |
| 508 | 509 |
| 509 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { | 510 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { |
| 510 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); | 511 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); |
| 511 } | 512 } |
| 513 |
| 514 void RenderViewHostImpl::SynchronousFind(int request_id, |
| 515 const string16& search_text, |
| 516 const WebKit::WebFindOptions& options, |
| 517 int* match_count, |
| 518 int* active_ordinal) { |
| 519 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 520 switches::kEnableWebViewSynchronousAPIs)) { |
| 521 return; |
| 522 } |
| 523 |
| 524 Send(new ViewMsg_SynchronousFind(GetRoutingID(), request_id, search_text, |
| 525 options, match_count, active_ordinal)); |
| 526 } |
| 512 #endif | 527 #endif |
| 513 | 528 |
| 514 void RenderViewHostImpl::DragTargetDragEnter( | 529 void RenderViewHostImpl::DragTargetDragEnter( |
| 515 const WebDropData& drop_data, | 530 const WebDropData& drop_data, |
| 516 const gfx::Point& client_pt, | 531 const gfx::Point& client_pt, |
| 517 const gfx::Point& screen_pt, | 532 const gfx::Point& screen_pt, |
| 518 WebDragOperationsMask operations_allowed, | 533 WebDragOperationsMask operations_allowed, |
| 519 int key_modifiers) { | 534 int key_modifiers) { |
| 520 const int renderer_id = GetProcess()->GetID(); | 535 const int renderer_id = GetProcess()->GetID(); |
| 521 ChildProcessSecurityPolicyImpl* policy = | 536 ChildProcessSecurityPolicyImpl* policy = |
| (...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1927 // can cause navigations to be ignored in OnMsgNavigate. | 1942 // can cause navigations to be ignored in OnMsgNavigate. |
| 1928 is_waiting_for_beforeunload_ack_ = false; | 1943 is_waiting_for_beforeunload_ack_ = false; |
| 1929 is_waiting_for_unload_ack_ = false; | 1944 is_waiting_for_unload_ack_ = false; |
| 1930 } | 1945 } |
| 1931 | 1946 |
| 1932 void RenderViewHostImpl::ClearPowerSaveBlockers() { | 1947 void RenderViewHostImpl::ClearPowerSaveBlockers() { |
| 1933 STLDeleteValues(&power_save_blockers_); | 1948 STLDeleteValues(&power_save_blockers_); |
| 1934 } | 1949 } |
| 1935 | 1950 |
| 1936 } // namespace content | 1951 } // namespace content |
| OLD | NEW |