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

Side by Side Diff: chrome/browser/notifications/balloon_host.cc

Issue 8403024: Set extension-related webkit preferences in a common location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove is_web_ui param 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
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/notifications/balloon_host.h" 5 #include "chrome/browser/notifications/balloon_host.h"
6 #include "chrome/browser/notifications/balloon.h" 6 #include "chrome/browser/notifications/balloon.h"
7 #include "chrome/browser/notifications/notification.h" 7 #include "chrome/browser/notifications/notification.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/renderer_preferences_util.h" 9 #include "chrome/browser/renderer_preferences_util.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 TabContents* BalloonHost::GetAssociatedTabContents() const { 59 TabContents* BalloonHost::GetAssociatedTabContents() const {
60 return NULL; 60 return NULL;
61 } 61 }
62 62
63 const string16& BalloonHost::GetSource() const { 63 const string16& BalloonHost::GetSource() const {
64 return balloon_->notification().display_source(); 64 return balloon_->notification().display_source();
65 } 65 }
66 66
67 WebPreferences BalloonHost::GetWebkitPrefs() { 67 WebPreferences BalloonHost::GetWebkitPrefs() {
68 WebPreferences web_prefs = 68 WebPreferences web_prefs =
69 RenderViewHostDelegateHelper::GetWebkitPrefs(balloon_->profile(), 69 RenderViewHostDelegateHelper::GetWebkitPrefs(render_view_host_);
70 enable_web_ui_);
71 web_prefs.allow_scripts_to_close_windows = true; 70 web_prefs.allow_scripts_to_close_windows = true;
72 return web_prefs; 71 return web_prefs;
73 } 72 }
74 73
75 const GURL& BalloonHost::GetURL() const { 74 const GURL& BalloonHost::GetURL() const {
76 return balloon_->notification().content_url(); 75 return balloon_->notification().content_url();
77 } 76 }
78 77
79 void BalloonHost::Close(RenderViewHost* render_view_host) { 78 void BalloonHost::Close(RenderViewHost* render_view_host) {
80 balloon_->CloseByScript(); 79 balloon_->CloseByScript();
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 should_notify_on_disconnect_ = false; 209 should_notify_on_disconnect_ = false;
211 content::NotificationService::current()->Notify( 210 content::NotificationService::current()->Notify(
212 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 211 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
213 content::Source<BalloonHost>(this), 212 content::Source<BalloonHost>(this),
214 content::NotificationService::NoDetails()); 213 content::NotificationService::NoDetails());
215 } 214 }
216 215
217 bool BalloonHost::IsRenderViewReady() const { 216 bool BalloonHost::IsRenderViewReady() const {
218 return should_notify_on_disconnect_; 217 return should_notify_on_disconnect_;
219 } 218 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webkit_preferences.cc ('k') | chrome/browser/tab_contents/background_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698