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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 6676015: Coverity: Pass values by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win/Mac fix. Created 9 years, 9 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
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | no next file » | 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/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 event_box_.Destroy(); 1468 event_box_.Destroy();
1469 for (PixbufMap::iterator iter = pixbufs_.begin(); iter != pixbufs_.end(); 1469 for (PixbufMap::iterator iter = pixbufs_.begin(); iter != pixbufs_.end();
1470 ++iter) { 1470 ++iter) {
1471 g_object_unref(iter->second); 1471 g_object_unref(iter->second);
1472 } 1472 }
1473 if (last_icon_pixbuf_) 1473 if (last_icon_pixbuf_)
1474 g_object_unref(last_icon_pixbuf_); 1474 g_object_unref(last_icon_pixbuf_);
1475 } 1475 }
1476 1476
1477 void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility( 1477 void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility(
1478 TabContents* contents, GURL url) { 1478 TabContents* contents, const GURL& url) {
1479 // Save this off so we can pass it back to the extension when the action gets 1479 // Save this off so we can pass it back to the extension when the action gets
1480 // executed. See PageActionImageView::OnMousePressed. 1480 // executed. See PageActionImageView::OnMousePressed.
1481 current_tab_id_ = contents ? ExtensionTabUtil::GetTabId(contents) : -1; 1481 current_tab_id_ = contents ? ExtensionTabUtil::GetTabId(contents) : -1;
1482 current_url_ = url; 1482 current_url_ = url;
1483 1483
1484 bool visible = contents && 1484 bool visible = contents &&
1485 (preview_enabled_ || page_action_->GetIsVisible(current_tab_id_)); 1485 (preview_enabled_ || page_action_->GetIsVisible(current_tab_id_));
1486 if (visible) { 1486 if (visible) {
1487 // Set the tooltip. 1487 // Set the tooltip.
1488 gtk_widget_set_tooltip_text(event_box_.get(), 1488 gtk_widget_set_tooltip_text(event_box_.get(),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1632 1632
1633 std::string badge_text = page_action_->GetBadgeText(tab_id); 1633 std::string badge_text = page_action_->GetBadgeText(tab_id);
1634 if (badge_text.empty()) 1634 if (badge_text.empty())
1635 return FALSE; 1635 return FALSE;
1636 1636
1637 gfx::CanvasSkiaPaint canvas(event, false); 1637 gfx::CanvasSkiaPaint canvas(event, false);
1638 gfx::Rect bounding_rect(widget->allocation); 1638 gfx::Rect bounding_rect(widget->allocation);
1639 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); 1639 page_action_->PaintBadge(&canvas, bounding_rect, tab_id);
1640 return FALSE; 1640 return FALSE;
1641 } 1641 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698