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 25 matching lines...) Expand all Loading... |
36 InitRenderViewHostForExtensions(); | 36 InitRenderViewHostForExtensions(); |
37 } | 37 } |
38 | 38 |
39 ChromeRenderViewHostObserver::~ChromeRenderViewHostObserver() { | 39 ChromeRenderViewHostObserver::~ChromeRenderViewHostObserver() { |
40 if (render_view_host()) | 40 if (render_view_host()) |
41 RemoveRenderViewHostForExtensions(render_view_host()); | 41 RemoveRenderViewHostForExtensions(render_view_host()); |
42 } | 42 } |
43 | 43 |
44 void ChromeRenderViewHostObserver::RenderViewHostInitialized() { | 44 void ChromeRenderViewHostObserver::RenderViewHostInitialized() { |
45 InitRenderViewForExtensions(); | 45 InitRenderViewForExtensions(); |
46 | |
47 if (render_view_host()->GetDelegate()->GetRenderViewType() == | |
48 content::VIEW_TYPE_INTERSTITIAL_PAGE) { | |
49 render_view_host()->Send(new ChromeViewMsg_SetAsInterstitial( | |
50 render_view_host()->GetRoutingID())); | |
51 } | |
52 } | 46 } |
53 | 47 |
54 void ChromeRenderViewHostObserver::RenderViewHostDestroyed( | 48 void ChromeRenderViewHostObserver::RenderViewHostDestroyed( |
55 RenderViewHost* rvh) { | 49 RenderViewHost* rvh) { |
56 RemoveRenderViewHostForExtensions(rvh); | 50 RemoveRenderViewHostForExtensions(rvh); |
57 delete this; | 51 delete this; |
58 } | 52 } |
59 | 53 |
60 void ChromeRenderViewHostObserver::Navigate(const GURL& url) { | 54 void ChromeRenderViewHostObserver::Navigate(const GURL& url) { |
61 if (!predictor_) | 55 if (!predictor_) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if (process_manager) | 169 if (process_manager) |
176 process_manager->UnregisterRenderViewHost(rvh); | 170 process_manager->UnregisterRenderViewHost(rvh); |
177 } | 171 } |
178 | 172 |
179 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { | 173 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { |
180 content::NotificationService::current()->Notify( | 174 content::NotificationService::current()->Notify( |
181 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, | 175 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, |
182 content::Source<RenderViewHost>(render_view_host()), | 176 content::Source<RenderViewHost>(render_view_host()), |
183 content::NotificationService::NoDetails()); | 177 content::NotificationService::NoDetails()); |
184 } | 178 } |
OLD | NEW |