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

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

Issue 306059: Merge 29556 - Revert "Revert 29457, because this is making ExtensionBrowserTe... (Closed) Base URL: svn://chrome-svn/chrome/branches/223/src/
Patch Set: Created 11 years, 2 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/views/location_bar_view.h ('k') | chrome/common/extensions/extension_action.h » ('j') | 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:r29556
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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 } 1165 }
1166 1166
1167 void LocationBarView::SecurityImageView::ShowInfoBubble() { 1167 void LocationBarView::SecurityImageView::ShowInfoBubble() {
1168 std::wstring text; 1168 std::wstring text;
1169 model_->GetIconHoverText(&text); 1169 model_->GetIconHoverText(&text);
1170 ShowInfoBubbleImpl(text, GetColor( 1170 ShowInfoBubbleImpl(text, GetColor(
1171 model_->GetSecurityLevel() == ToolbarModel::SECURE, 1171 model_->GetSecurityLevel() == ToolbarModel::SECURE,
1172 SECURITY_INFO_BUBBLE_TEXT)); 1172 SECURITY_INFO_BUBBLE_TEXT));
1173 } 1173 }
1174 1174
1175 void LocationBarView::PageActionImageView::Paint(gfx::Canvas* canvas) {
1176 LocationBarImageView::Paint(canvas);
1177
1178 TabContents* contents = owner_->delegate_->GetTabContents();
1179 if (!contents)
1180 return;
1181
1182 const ExtensionActionState* state =
1183 contents->GetPageActionState(page_action_);
1184 if (state)
1185 state->PaintBadge(canvas, gfx::Rect(width(), height()));
1186 }
1187
1175 // PageActionImageView---------------------------------------------------------- 1188 // PageActionImageView----------------------------------------------------------
1176 1189
1177 LocationBarView::PageActionImageView::PageActionImageView( 1190 LocationBarView::PageActionImageView::PageActionImageView(
1178 LocationBarView* owner, 1191 LocationBarView* owner,
1179 Profile* profile, 1192 Profile* profile,
1180 const ExtensionAction* page_action, 1193 const ExtensionAction* page_action,
1181 const BubblePositioner* bubble_positioner) 1194 const BubblePositioner* bubble_positioner)
1182 : LocationBarImageView(bubble_positioner), 1195 : LocationBarImageView(bubble_positioner),
1183 owner_(owner), 1196 owner_(owner),
1184 profile_(profile), 1197 profile_(profile),
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 } 1332 }
1320 1333
1321 int LocationBarView::PageActionVisibleCount() { 1334 int LocationBarView::PageActionVisibleCount() {
1322 int result = 0; 1335 int result = 0;
1323 for (size_t i = 0; i < page_action_image_views_.size(); i++) { 1336 for (size_t i = 0; i < page_action_image_views_.size(); i++) {
1324 if (page_action_image_views_[i]->IsVisible()) 1337 if (page_action_image_views_[i]->IsVisible())
1325 ++result; 1338 ++result;
1326 } 1339 }
1327 return result; 1340 return result;
1328 } 1341 }
OLDNEW
« no previous file with comments | « chrome/browser/views/location_bar_view.h ('k') | chrome/common/extensions/extension_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698