Chromium Code Reviews| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 #include "base/strings/string16.h" | 28 #include "base/strings/string16.h" |
| 29 #include "base/strings/string_number_conversions.h" | 29 #include "base/strings/string_number_conversions.h" |
| 30 #include "base/strings/string_util.h" | 30 #include "base/strings/string_util.h" |
| 31 #include "base/strings/utf_string_conversions.h" | 31 #include "base/strings/utf_string_conversions.h" |
| 32 #include "base/threading/thread_task_runner_handle.h" | 32 #include "base/threading/thread_task_runner_handle.h" |
| 33 #include "base/time/time.h" | 33 #include "base/time/time.h" |
| 34 #include "base/trace_event/trace_event.h" | 34 #include "base/trace_event/trace_event.h" |
| 35 #include "build/build_config.h" | 35 #include "build/build_config.h" |
| 36 #include "components/mime_util/mime_util.h" | 36 #include "components/mime_util/mime_util.h" |
| 37 #include "components/rappor/public/rappor_utils.h" | 37 #include "components/rappor/public/rappor_utils.h" |
| 38 #include "components/ukm/ukm_service.h" | |
| 38 #include "components/url_formatter/url_formatter.h" | 39 #include "components/url_formatter/url_formatter.h" |
| 39 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 40 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 40 #include "content/browser/bad_message.h" | 41 #include "content/browser/bad_message.h" |
| 41 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 42 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 42 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 43 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 43 #include "content/browser/child_process_security_policy_impl.h" | 44 #include "content/browser/child_process_security_policy_impl.h" |
| 44 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 45 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 45 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 46 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 46 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 47 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 47 #include "content/browser/download/download_stats.h" | 48 #include "content/browser/download/download_stats.h" |
| (...skipping 5521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5569 binding_sets_.erase(it); | 5570 binding_sets_.erase(it); |
| 5570 } | 5571 } |
| 5571 | 5572 |
| 5572 bool WebContentsImpl::AddDomainInfoToRapporSample(rappor::Sample* sample) { | 5573 bool WebContentsImpl::AddDomainInfoToRapporSample(rappor::Sample* sample) { |
| 5573 sample->SetStringField("Domain", ::rappor::GetDomainAndRegistrySampleFromGURL( | 5574 sample->SetStringField("Domain", ::rappor::GetDomainAndRegistrySampleFromGURL( |
| 5574 GetLastCommittedURL())); | 5575 GetLastCommittedURL())); |
| 5575 | 5576 |
| 5576 return true; | 5577 return true; |
| 5577 } | 5578 } |
| 5578 | 5579 |
| 5580 bool WebContentsImpl::UpdateUrlForUkmSource(ukm::UkmService* service, | |
| 5581 int32_t ukm_source_id) { | |
| 5582 service->UpdateSourceURL(ukm_source_id, GetLastCommittedURL()); | |
|
Charlie Reis
2017/05/24 16:28:32
I'm assuming this intentionally only uses the main
Navid Zolghadr
2017/05/25 15:45:46
Done.
| |
| 5583 return true; | |
| 5584 } | |
| 5585 | |
| 5579 void WebContentsImpl::FocusedNodeTouched(bool editable) { | 5586 void WebContentsImpl::FocusedNodeTouched(bool editable) { |
| 5580 #if defined(OS_WIN) | 5587 #if defined(OS_WIN) |
| 5581 // We use the cursor position to determine where the touch occurred. | 5588 // We use the cursor position to determine where the touch occurred. |
| 5582 RenderWidgetHostView* view = GetRenderWidgetHostView(); | 5589 RenderWidgetHostView* view = GetRenderWidgetHostView(); |
| 5583 if (!view) | 5590 if (!view) |
| 5584 return; | 5591 return; |
| 5585 POINT cursor_pos = {}; | 5592 POINT cursor_pos = {}; |
| 5586 ::GetCursorPos(&cursor_pos); | 5593 ::GetCursorPos(&cursor_pos); |
| 5587 float scale = GetScaleFactorForView(view); | 5594 float scale = GetScaleFactorForView(view); |
| 5588 gfx::Point location_dips_screen = | 5595 gfx::Point location_dips_screen = |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5631 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5638 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5632 if (!render_view_host) | 5639 if (!render_view_host) |
| 5633 continue; | 5640 continue; |
| 5634 render_view_host_set.insert(render_view_host); | 5641 render_view_host_set.insert(render_view_host); |
| 5635 } | 5642 } |
| 5636 for (RenderViewHost* render_view_host : render_view_host_set) | 5643 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5637 render_view_host->OnWebkitPreferencesChanged(); | 5644 render_view_host->OnWebkitPreferencesChanged(); |
| 5638 } | 5645 } |
| 5639 | 5646 |
| 5640 } // namespace content | 5647 } // namespace content |
| OLD | NEW |