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

Side by Side Diff: chrome/browser/ui/cocoa/notifications/balloon_controller.mm

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/ui/cocoa/notifications/balloon_controller.h" 5 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h"
6 6
7 #import "base/mac/cocoa_protocols.h" 7 #import "base/mac/cocoa_protocols.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 delayedClose_ = YES; 170 delayedClose_ = YES;
171 return; 171 return;
172 } 172 }
173 [self closeBalloonNow: byUser]; 173 [self closeBalloonNow: byUser];
174 } 174 }
175 175
176 - (void)updateContents { 176 - (void)updateContents {
177 DCHECK(htmlContents_.get()) << "BalloonView::Update called before Show"; 177 DCHECK(htmlContents_.get()) << "BalloonView::Update called before Show";
178 if (htmlContents_->tab_contents()) { 178 if (htmlContents_->tab_contents()) {
179 htmlContents_->tab_contents()->controller().LoadURL( 179 htmlContents_->tab_contents()->controller().LoadURL(
180 balloon_->notification().content_url(), GURL(), 180 balloon_->notification().content_url(), content::Referrer(),
181 content::PAGE_TRANSITION_LINK, std::string()); 181 content::PAGE_TRANSITION_LINK, std::string());
182 } 182 }
183 } 183 }
184 184
185 - (void)repositionToBalloon { 185 - (void)repositionToBalloon {
186 DCHECK(balloon_); 186 DCHECK(balloon_);
187 int x = balloon_->GetPosition().x(); 187 int x = balloon_->GetPosition().x();
188 int y = balloon_->GetPosition().y(); 188 int y = balloon_->GetPosition().y();
189 int w = [self desiredTotalWidth]; 189 int w = [self desiredTotalWidth];
190 int h = [self desiredTotalHeight]; 190 int h = [self desiredTotalHeight];
(...skipping 26 matching lines...) Expand all
217 htmlContents_.reset(new BalloonViewHost(balloon_)); 217 htmlContents_.reset(new BalloonViewHost(balloon_));
218 htmlContents_->Init(); 218 htmlContents_->Init();
219 } 219 }
220 220
221 // NSWindowDelegate notification. 221 // NSWindowDelegate notification.
222 - (void)windowWillClose:(NSNotification*)notif { 222 - (void)windowWillClose:(NSNotification*)notif {
223 [self autorelease]; 223 [self autorelease];
224 } 224 }
225 225
226 @end 226 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/html_dialog_window_controller.mm ('k') | chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698