| 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 "chrome/browser/renderer_host/chrome_render_view_host_observer.h" | 5 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/net/predictor.h" | 9 #include "chrome/browser/net/predictor.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/common/chrome_notification_types.h" | 11 #include "chrome/common/chrome_notification_types.h" |
| 12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chrome/common/extensions/extension_messages.h" | 13 #include "chrome/common/extensions/extension_messages.h" |
| 14 #include "chrome/common/render_messages.h" | 14 #include "chrome/common/render_messages.h" |
| 15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "content/browser/child_process_security_policy.h" | |
| 17 #include "content/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
| 17 #include "content/public/browser/child_process_security_policy.h" |
| 18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 19 #include "content/public/browser/render_view_host_delegate.h" | 19 #include "content/public/browser/render_view_host_delegate.h" |
| 20 #include "content/public/browser/site_instance.h" | 20 #include "content/public/browser/site_instance.h" |
| 21 | 21 |
| 22 using content::ChildProcessSecurityPolicy; |
| 22 using content::SiteInstance; | 23 using content::SiteInstance; |
| 23 | 24 |
| 24 ChromeRenderViewHostObserver::ChromeRenderViewHostObserver( | 25 ChromeRenderViewHostObserver::ChromeRenderViewHostObserver( |
| 25 RenderViewHost* render_view_host, chrome_browser_net::Predictor* predictor) | 26 RenderViewHost* render_view_host, chrome_browser_net::Predictor* predictor) |
| 26 : content::RenderViewHostObserver(render_view_host), | 27 : content::RenderViewHostObserver(render_view_host), |
| 27 predictor_(predictor) { | 28 predictor_(predictor) { |
| 28 SiteInstance* site_instance = render_view_host->site_instance(); | 29 SiteInstance* site_instance = render_view_host->site_instance(); |
| 29 profile_ = Profile::FromBrowserContext( | 30 profile_ = Profile::FromBrowserContext( |
| 30 site_instance->GetBrowserContext()); | 31 site_instance->GetBrowserContext()); |
| 31 | 32 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 if (process_manager) | 161 if (process_manager) |
| 161 process_manager->UnregisterRenderViewHost(rvh); | 162 process_manager->UnregisterRenderViewHost(rvh); |
| 162 } | 163 } |
| 163 | 164 |
| 164 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { | 165 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { |
| 165 content::NotificationService::current()->Notify( | 166 content::NotificationService::current()->Notify( |
| 166 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, | 167 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, |
| 167 content::Source<RenderViewHost>(render_view_host()), | 168 content::Source<RenderViewHost>(render_view_host()), |
| 168 content::NotificationService::NoDetails()); | 169 content::NotificationService::NoDetails()); |
| 169 } | 170 } |
| OLD | NEW |