| 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 5340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5351 return; | 5351 return; |
| 5352 POINT cursor_pos = {}; | 5352 POINT cursor_pos = {}; |
| 5353 ::GetCursorPos(&cursor_pos); | 5353 ::GetCursorPos(&cursor_pos); |
| 5354 float scale = GetScaleFactorForView(view); | 5354 float scale = GetScaleFactorForView(view); |
| 5355 gfx::Point location_dips_screen = | 5355 gfx::Point location_dips_screen = |
| 5356 gfx::ConvertPointToDIP(scale, gfx::Point(cursor_pos)); | 5356 gfx::ConvertPointToDIP(scale, gfx::Point(cursor_pos)); |
| 5357 view->FocusedNodeTouched(location_dips_screen, editable); | 5357 view->FocusedNodeTouched(location_dips_screen, editable); |
| 5358 #endif | 5358 #endif |
| 5359 } | 5359 } |
| 5360 | 5360 |
| 5361 bool WebContentsImpl::HasFocusedGuests() { |
| 5362 return browser_plugin_embedder_ && |
| 5363 browser_plugin_embedder_->AreAnyGuestsFocused(); |
| 5364 } |
| 5365 |
| 5361 void WebContentsImpl::ShowInsecureLocalhostWarningIfNeeded() { | 5366 void WebContentsImpl::ShowInsecureLocalhostWarningIfNeeded() { |
| 5362 bool allow_localhost = base::CommandLine::ForCurrentProcess()->HasSwitch( | 5367 bool allow_localhost = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 5363 switches::kAllowInsecureLocalhost); | 5368 switches::kAllowInsecureLocalhost); |
| 5364 if (!allow_localhost) | 5369 if (!allow_localhost) |
| 5365 return; | 5370 return; |
| 5366 | 5371 |
| 5367 content::NavigationEntry* entry = GetController().GetLastCommittedEntry(); | 5372 content::NavigationEntry* entry = GetController().GetLastCommittedEntry(); |
| 5368 if (!entry || !net::IsLocalhost(entry->GetURL().host())) | 5373 if (!entry || !net::IsLocalhost(entry->GetURL().host())) |
| 5369 return; | 5374 return; |
| 5370 | 5375 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 5393 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5398 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5394 if (!render_view_host) | 5399 if (!render_view_host) |
| 5395 continue; | 5400 continue; |
| 5396 render_view_host_set.insert(render_view_host); | 5401 render_view_host_set.insert(render_view_host); |
| 5397 } | 5402 } |
| 5398 for (RenderViewHost* render_view_host : render_view_host_set) | 5403 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5399 render_view_host->OnWebkitPreferencesChanged(); | 5404 render_view_host->OnWebkitPreferencesChanged(); |
| 5400 } | 5405 } |
| 5401 | 5406 |
| 5402 } // namespace content | 5407 } // namespace content |
| OLD | NEW |