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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view.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
« no previous file with comments | « chrome/browser/ui/views/dom_view.cc ('k') | chrome/browser/ui/webui/web_ui_unittest.cc » ('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/ui/views/notifications/balloon_view.h" 5 #include "chrome/browser/ui/views/notifications/balloon_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 anim_frame_start_ = frame_container_->GetClientAreaScreenBounds(); 226 anim_frame_start_ = frame_container_->GetClientAreaScreenBounds();
227 animation_.reset(new ui::SlideAnimation(this)); 227 animation_.reset(new ui::SlideAnimation(this));
228 animation_->Show(); 228 animation_->Show();
229 } 229 }
230 230
231 void BalloonViewImpl::Update() { 231 void BalloonViewImpl::Update() {
232 DCHECK(html_contents_.get()) << "BalloonView::Update called before Show"; 232 DCHECK(html_contents_.get()) << "BalloonView::Update called before Show";
233 if (!html_contents_->tab_contents()) 233 if (!html_contents_->tab_contents())
234 return; 234 return;
235 html_contents_->tab_contents()->controller().LoadURL( 235 html_contents_->tab_contents()->controller().LoadURL(
236 balloon_->notification().content_url(), GURL(), 236 balloon_->notification().content_url(), content::Referrer(),
237 content::PAGE_TRANSITION_LINK, std::string()); 237 content::PAGE_TRANSITION_LINK, std::string());
238 } 238 }
239 239
240 void BalloonViewImpl::AnimationProgressed(const ui::Animation* animation) { 240 void BalloonViewImpl::AnimationProgressed(const ui::Animation* animation) {
241 DCHECK(animation == animation_.get()); 241 DCHECK(animation == animation_.get());
242 242
243 // Linear interpolation from start to end position. 243 // Linear interpolation from start to end position.
244 double e = animation->GetCurrentValue(); 244 double e = animation->GetCurrentValue();
245 double s = (1.0 - e); 245 double s = (1.0 - e);
246 246
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 return; 516 return;
517 } 517 }
518 518
519 // If the renderer process attached to this balloon is disconnected 519 // If the renderer process attached to this balloon is disconnected
520 // (e.g., because of a crash), we want to close the balloon. 520 // (e.g., because of a crash), we want to close the balloon.
521 notification_registrar_.Remove( 521 notification_registrar_.Remove(
522 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 522 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
523 content::Source<Balloon>(balloon_)); 523 content::Source<Balloon>(balloon_));
524 Close(false); 524 Close(false);
525 } 525 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/dom_view.cc ('k') | chrome/browser/ui/webui/web_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698