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 5357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5368 return; | 5368 return; |
5369 POINT cursor_pos = {}; | 5369 POINT cursor_pos = {}; |
5370 ::GetCursorPos(&cursor_pos); | 5370 ::GetCursorPos(&cursor_pos); |
5371 float scale = GetScaleFactorForView(view); | 5371 float scale = GetScaleFactorForView(view); |
5372 gfx::Point location_dips_screen = | 5372 gfx::Point location_dips_screen = |
5373 gfx::ConvertPointToDIP(scale, gfx::Point(cursor_pos)); | 5373 gfx::ConvertPointToDIP(scale, gfx::Point(cursor_pos)); |
5374 view->FocusedNodeTouched(location_dips_screen, editable); | 5374 view->FocusedNodeTouched(location_dips_screen, editable); |
5375 #endif | 5375 #endif |
5376 } | 5376 } |
5377 | 5377 |
| 5378 void WebContentsImpl::DidReceiveCompositorFrame() { |
| 5379 for (auto& observer : observers_) |
| 5380 observer.DidReceiveCompositorFrame(); |
| 5381 } |
| 5382 |
5378 void WebContentsImpl::ShowInsecureLocalhostWarningIfNeeded() { | 5383 void WebContentsImpl::ShowInsecureLocalhostWarningIfNeeded() { |
5379 bool allow_localhost = base::CommandLine::ForCurrentProcess()->HasSwitch( | 5384 bool allow_localhost = base::CommandLine::ForCurrentProcess()->HasSwitch( |
5380 switches::kAllowInsecureLocalhost); | 5385 switches::kAllowInsecureLocalhost); |
5381 if (!allow_localhost) | 5386 if (!allow_localhost) |
5382 return; | 5387 return; |
5383 | 5388 |
5384 content::NavigationEntry* entry = GetController().GetLastCommittedEntry(); | 5389 content::NavigationEntry* entry = GetController().GetLastCommittedEntry(); |
5385 if (!entry || !net::IsLocalhost(entry->GetURL().host())) | 5390 if (!entry || !net::IsLocalhost(entry->GetURL().host())) |
5386 return; | 5391 return; |
5387 | 5392 |
(...skipping 22 matching lines...) Expand all Loading... |
5410 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5415 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
5411 if (!render_view_host) | 5416 if (!render_view_host) |
5412 continue; | 5417 continue; |
5413 render_view_host_set.insert(render_view_host); | 5418 render_view_host_set.insert(render_view_host); |
5414 } | 5419 } |
5415 for (RenderViewHost* render_view_host : render_view_host_set) | 5420 for (RenderViewHost* render_view_host : render_view_host_set) |
5416 render_view_host->OnWebkitPreferencesChanged(); | 5421 render_view_host->OnWebkitPreferencesChanged(); |
5417 } | 5422 } |
5418 | 5423 |
5419 } // namespace content | 5424 } // namespace content |
OLD | NEW |