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

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

Issue 10021071: Remove Browser dependency in ExtensionFunctionDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 months 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) 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/notifications/balloon_host.h" 5 #include "chrome/browser/notifications/balloon_host.h"
6 6
7 #include "chrome/browser/notifications/balloon.h" 7 #include "chrome/browser/notifications/balloon.h"
8 #include "chrome/browser/notifications/balloon_collection_impl.h" 8 #include "chrome/browser/notifications/balloon_collection_impl.h"
9 #include "chrome/browser/notifications/notification.h" 9 #include "chrome/browser/notifications/notification.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 30 matching lines...) Expand all
41 extension_function_dispatcher_(balloon_->profile(), this)) { 41 extension_function_dispatcher_(balloon_->profile(), this)) {
42 site_instance_ = SiteInstance::CreateForURL( 42 site_instance_ = SiteInstance::CreateForURL(
43 balloon_->profile(), balloon_->notification().content_url()); 43 balloon_->profile(), balloon_->notification().content_url());
44 } 44 }
45 45
46 void BalloonHost::Shutdown() { 46 void BalloonHost::Shutdown() {
47 NotifyDisconnect(); 47 NotifyDisconnect();
48 web_contents_.reset(); 48 web_contents_.reset();
49 } 49 }
50 50
51 Browser* BalloonHost::GetBrowser() { 51 ExtensionWindowController* BalloonHost::GetExtensionWindowController() const {
52 // Notifications aren't associated with a particular browser. 52 // Notifications don't have a window controller.
53 return NULL; 53 return NULL;
54 } 54 }
55 55
56 content::WebContents* BalloonHost::GetAssociatedWebContents() const { 56 content::WebContents* BalloonHost::GetAssociatedWebContents() const {
57 return NULL; 57 return NULL;
58 } 58 }
59 59
60 const string16& BalloonHost::GetSource() const { 60 const string16& BalloonHost::GetSource() const {
61 return balloon_->notification().display_source(); 61 return balloon_->notification().display_source();
62 } 62 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 bool BalloonHost::CanLoadDataURLsInWebUI() const { 170 bool BalloonHost::CanLoadDataURLsInWebUI() const {
171 #if defined(OS_CHROMEOS) 171 #if defined(OS_CHROMEOS)
172 // Chrome OS uses data URLs in WebUI BalloonHosts. We normally do not allow 172 // Chrome OS uses data URLs in WebUI BalloonHosts. We normally do not allow
173 // data URLs in WebUI renderers, but normal pages cannot target BalloonHosts, 173 // data URLs in WebUI renderers, but normal pages cannot target BalloonHosts,
174 // so this should be safe. 174 // so this should be safe.
175 return true; 175 return true;
176 #else 176 #else
177 return false; 177 return false;
178 #endif 178 #endif
179 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698