Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.cc

Issue 8447017: [DRAFT] Add new default stylesheet for platform apps. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/dom_operation_notification_details.h" 8 #include "chrome/browser/dom_operation_notification_details.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/net/predictor.h" 10 #include "chrome/browser/net/predictor.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/chrome_notification_types.h" 12 #include "chrome/common/chrome_notification_types.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/common/extensions/extension_messages.h" 14 #include "chrome/common/extensions/extension_messages.h"
15 #include "chrome/common/extensions/platform_app_messages.h"
15 #include "chrome/common/render_messages.h" 16 #include "chrome/common/render_messages.h"
16 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
17 #include "content/browser/browsing_instance.h" 18 #include "content/browser/browsing_instance.h"
18 #include "content/browser/child_process_security_policy.h" 19 #include "content/browser/child_process_security_policy.h"
19 #include "content/browser/renderer_host/render_view_host_delegate.h" 20 #include "content/browser/renderer_host/render_view_host_delegate.h"
20 #include "content/browser/renderer_host/render_view_host.h" 21 #include "content/browser/renderer_host/render_view_host.h"
21 #include "content/browser/site_instance.h" 22 #include "content/browser/site_instance.h"
22 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
23 #include "content/common/view_messages.h" 24 #include "content/common/view_messages.h"
24 25
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 if (extension->is_app()) { 102 if (extension->is_app()) {
102 Send(new ExtensionMsg_ActivateApplication(extension->id())); 103 Send(new ExtensionMsg_ActivateApplication(extension->id()));
103 // Though we already record the associated process ID for the renderer in 104 // Though we already record the associated process ID for the renderer in
104 // InitRenderViewHostForExtensions, the process might have crashed and been 105 // InitRenderViewHostForExtensions, the process might have crashed and been
105 // restarted (hence the re-initialization), so we need to update that 106 // restarted (hence the re-initialization), so we need to update that
106 // mapping. 107 // mapping.
107 profile_->GetExtensionService()->SetInstalledAppForRenderer( 108 profile_->GetExtensionService()->SetInstalledAppForRenderer(
108 process->id(), extension); 109 process->id(), extension);
109 } 110 }
111 if (extension->is_platform_app()) {
112 Send(new PlatformAppMsg_IsPlatformApp());
113 }
110 114
111 // Some extensions use chrome:// URLs. 115 // Some extensions use chrome:// URLs.
112 Extension::Type type = extension->GetType(); 116 Extension::Type type = extension->GetType();
113 if (type == Extension::TYPE_EXTENSION || 117 if (type == Extension::TYPE_EXTENSION ||
114 type == Extension::TYPE_PACKAGED_APP) { 118 type == Extension::TYPE_PACKAGED_APP) {
115 ChildProcessSecurityPolicy::GetInstance()->GrantScheme( 119 ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
116 process->id(), chrome::kChromeUIScheme); 120 process->id(), chrome::kChromeUIScheme);
117 } 121 }
118 122
119 if (type == Extension::TYPE_EXTENSION || 123 if (type == Extension::TYPE_EXTENSION ||
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 content::Source<RenderViewHost>(render_view_host()), 163 content::Source<RenderViewHost>(render_view_host()),
160 content::Details<DomOperationNotificationDetails>(&details)); 164 content::Details<DomOperationNotificationDetails>(&details));
161 } 165 }
162 166
163 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() { 167 void ChromeRenderViewHostObserver::OnFocusedEditableNodeTouched() {
164 content::NotificationService::current()->Notify( 168 content::NotificationService::current()->Notify(
165 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED, 169 chrome::NOTIFICATION_FOCUSED_EDITABLE_NODE_TOUCHED,
166 content::Source<RenderViewHost>(render_view_host()), 170 content::Source<RenderViewHost>(render_view_host()),
167 content::NotificationService::NoDetails()); 171 content::NotificationService::NoDetails());
168 } 172 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698