| 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" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // Always send a Loaded message before ActivateExtension so that | 124 // Always send a Loaded message before ActivateExtension so that |
| 125 // ExtensionDispatcher knows what Extension is active, not just its ID. | 125 // ExtensionDispatcher knows what Extension is active, not just its ID. |
| 126 // This is important for classifying the Extension's JavaScript context | 126 // This is important for classifying the Extension's JavaScript context |
| 127 // correctly (see ExtensionDispatcher::ClassifyJavaScriptContext). | 127 // correctly (see ExtensionDispatcher::ClassifyJavaScriptContext). |
| 128 Send(new ExtensionMsg_Loaded( | 128 Send(new ExtensionMsg_Loaded( |
| 129 std::vector<ExtensionMsg_Loaded_Params>( | 129 std::vector<ExtensionMsg_Loaded_Params>( |
| 130 1, ExtensionMsg_Loaded_Params(extension)))); | 130 1, ExtensionMsg_Loaded_Params(extension)))); |
| 131 Send(new ExtensionMsg_ActivateExtension(extension->id())); | 131 Send(new ExtensionMsg_ActivateExtension(extension->id())); |
| 132 break; | 132 break; |
| 133 | 133 |
| 134 case Extension::TYPE_CONTENT_PACK: |
| 135 case Extension::TYPE_THEME: |
| 134 case Extension::TYPE_UNKNOWN: | 136 case Extension::TYPE_UNKNOWN: |
| 135 case Extension::TYPE_THEME: | |
| 136 break; | 137 break; |
| 137 } | 138 } |
| 138 } | 139 } |
| 139 | 140 |
| 140 const Extension* ChromeRenderViewHostObserver::GetExtension() { | 141 const Extension* ChromeRenderViewHostObserver::GetExtension() { |
| 141 // Note that due to ChromeContentBrowserClient::GetEffectiveURL(), hosted apps | 142 // Note that due to ChromeContentBrowserClient::GetEffectiveURL(), hosted apps |
| 142 // (excluding bookmark apps) will have a chrome-extension:// URL for their | 143 // (excluding bookmark apps) will have a chrome-extension:// URL for their |
| 143 // site, so we can ignore that wrinkle here. | 144 // site, so we can ignore that wrinkle here. |
| 144 SiteInstance* site_instance = render_view_host()->GetSiteInstance(); | 145 SiteInstance* site_instance = render_view_host()->GetSiteInstance(); |
| 145 const GURL& site = site_instance->GetSite(); | 146 const GURL& site = site_instance->GetSite(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 170 if (process_manager) | 171 if (process_manager) |
| 171 process_manager->UnregisterRenderViewHost(rvh); | 172 process_manager->UnregisterRenderViewHost(rvh); |
| 172 } | 173 } |
| 173 | 174 |
| 174 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { | 175 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { |
| 175 content::NotificationService::current()->Notify( | 176 content::NotificationService::current()->Notify( |
| 176 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, | 177 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, |
| 177 content::Source<RenderViewHost>(render_view_host()), | 178 content::Source<RenderViewHost>(render_view_host()), |
| 178 content::NotificationService::NoDetails()); | 179 content::NotificationService::NoDetails()); |
| 179 } | 180 } |
| OLD | NEW |