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

Side by Side Diff: chrome/browser/views/location_bar_view.cc

Issue 165199: Merge 22254 - LocationBarView::PageActionImageView::LoadImageTask::Run() may ... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/views/location_bar_view.cc:r22254
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/views/location_bar_view.h" 5 #include "chrome/browser/views/location_bar_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 // get deleted until we get a response from image loading (see 1146 // get deleted until we get a response from image loading (see
1147 // ImageLoadingDone). 1147 // ImageLoadingDone).
1148 } 1148 }
1149 ~ImageLoadingTracker() {} 1149 ~ImageLoadingTracker() {}
1150 1150
1151 void StopTrackingImageLoad() { 1151 void StopTrackingImageLoad() {
1152 view_ = NULL; 1152 view_ = NULL;
1153 } 1153 }
1154 1154
1155 void OnImageLoaded(SkBitmap* image, int index) { 1155 void OnImageLoaded(SkBitmap* image, int index) {
1156 if (image == NULL) 1156 if (image == NULL) {
1157 NOTREACHED();
1157 image = new SkBitmap(); 1158 image = new SkBitmap();
1159 }
1158 if (view_) 1160 if (view_)
1159 view_->OnImageLoaded(image, index); 1161 view_->OnImageLoaded(image, index);
1160 delete image; 1162 delete image;
1161 if (--image_count_ == 0) 1163 if (--image_count_ == 0)
1162 Release(); // We are no longer needed. 1164 Release(); // We are no longer needed.
1163 } 1165 }
1164 1166
1165 private: 1167 private:
1166 1168
1167 // The view that is waiting for the image to load. 1169 // The view that is waiting for the image to load.
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 } 1374 }
1373 1375
1374 int LocationBarView::PageActionVisibleCount() { 1376 int LocationBarView::PageActionVisibleCount() {
1375 int result = 0; 1377 int result = 0;
1376 for (size_t i = 0; i < page_action_image_views_.size(); i++) { 1378 for (size_t i = 0; i < page_action_image_views_.size(); i++) {
1377 if (page_action_image_views_[i]->IsVisible()) 1379 if (page_action_image_views_[i]->IsVisible())
1378 ++result; 1380 ++result;
1379 } 1381 }
1380 return result; 1382 return result;
1381 } 1383 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698