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

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

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 balloon_->profile(), 115 balloon_->profile(),
116 site_instance_.get(), 116 site_instance_.get(),
117 MSG_ROUTING_NONE, 117 MSG_ROUTING_NONE,
118 NULL, 118 NULL,
119 NULL)); 119 NULL));
120 tab_contents_->set_view_type(chrome::VIEW_TYPE_NOTIFICATION); 120 tab_contents_->set_view_type(chrome::VIEW_TYPE_NOTIFICATION);
121 tab_contents_->set_delegate(this); 121 tab_contents_->set_delegate(this);
122 Observe(tab_contents_.get()); 122 Observe(tab_contents_.get());
123 123
124 tab_contents_->controller().LoadURL( 124 tab_contents_->controller().LoadURL(
125 balloon_->notification().content_url(), GURL(), 125 balloon_->notification().content_url(), content::Referrer(),
126 content::PAGE_TRANSITION_LINK, std::string()); 126 content::PAGE_TRANSITION_LINK, std::string());
127 127
128 initialized_ = true; 128 initialized_ = true;
129 } 129 }
130 130
131 void BalloonHost::EnableWebUI() { 131 void BalloonHost::EnableWebUI() {
132 DCHECK(!tab_contents_.get()) << 132 DCHECK(!tab_contents_.get()) <<
133 "EnableWebUI has to be called before a renderer is created."; 133 "EnableWebUI has to be called before a renderer is created.";
134 enable_web_ui_ = true; 134 enable_web_ui_ = true;
135 } 135 }
136 136
137 BalloonHost::~BalloonHost() { 137 BalloonHost::~BalloonHost() {
138 } 138 }
139 139
140 void BalloonHost::NotifyDisconnect() { 140 void BalloonHost::NotifyDisconnect() {
141 if (!should_notify_on_disconnect_) 141 if (!should_notify_on_disconnect_)
142 return; 142 return;
143 143
144 should_notify_on_disconnect_ = false; 144 should_notify_on_disconnect_ = false;
145 content::NotificationService::current()->Notify( 145 content::NotificationService::current()->Notify(
146 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 146 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
147 content::Source<BalloonHost>(this), 147 content::Source<BalloonHost>(this),
148 content::NotificationService::NoDetails()); 148 content::NotificationService::NoDetails());
149 } 149 }
150 150
151 bool BalloonHost::IsRenderViewReady() const { 151 bool BalloonHost::IsRenderViewReady() const {
152 return should_notify_on_disconnect_; 152 return should_notify_on_disconnect_;
153 } 153 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_loader.cc ('k') | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698