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

Side by Side Diff: chrome/browser/ui/gtk/notifications/balloon_view_gtk.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/ui/gtk/notifications/balloon_view_gtk.h" 5 #include "chrome/browser/ui/gtk/notifications/balloon_view_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 notification_registrar_.Add(this, 341 notification_registrar_.Add(this,
342 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 342 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
343 content::Source<Balloon>(balloon)); 343 content::Source<Balloon>(balloon));
344 } 344 }
345 345
346 void BalloonViewImpl::Update() { 346 void BalloonViewImpl::Update() {
347 DCHECK(html_contents_.get()) << "BalloonView::Update called before Show"; 347 DCHECK(html_contents_.get()) << "BalloonView::Update called before Show";
348 if (!html_contents_->tab_contents()) 348 if (!html_contents_->tab_contents())
349 return; 349 return;
350 html_contents_->tab_contents()->controller().LoadURL( 350 html_contents_->tab_contents()->controller().LoadURL(
351 balloon_->notification().content_url(), GURL(), 351 balloon_->notification().content_url(), content::Referrer(),
352 content::PAGE_TRANSITION_LINK, std::string()); 352 content::PAGE_TRANSITION_LINK, std::string());
353 } 353 }
354 354
355 gfx::Point BalloonViewImpl::GetContentsOffset() const { 355 gfx::Point BalloonViewImpl::GetContentsOffset() const {
356 return gfx::Point(kLeftShadowWidth + kLeftMargin, 356 return gfx::Point(kLeftShadowWidth + kLeftMargin,
357 GetShelfHeight() + kTopShadowWidth + kTopMargin); 357 GetShelfHeight() + kTopShadowWidth + kTopMargin);
358 } 358 }
359 359
360 int BalloonViewImpl::GetShelfHeight() const { 360 int BalloonViewImpl::GetShelfHeight() const {
361 // TODO(johnnyg): add scaling here. 361 // TODO(johnnyg): add scaling here.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 weak_factory_.GetWeakPtr(), 477 weak_factory_.GetWeakPtr(),
478 false)); 478 false));
479 } 479 }
480 } 480 }
481 481
482 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) { 482 gboolean BalloonViewImpl::OnDestroy(GtkWidget* widget) {
483 frame_container_ = NULL; 483 frame_container_ = NULL;
484 Close(false); 484 Close(false);
485 return FALSE; // Propagate. 485 return FALSE; // Propagate.
486 } 486 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/html_dialog_gtk.cc ('k') | chrome/browser/ui/gtk/web_intent_picker_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698