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

Side by Side Diff: chrome/browser/ui/views/location_bar/page_action_with_badge_view.cc

Issue 6204002: Carnitas: Remove chrome/browser/views, update references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yay, more syncing Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 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/views/location_bar/page_action_with_badge_view.h" 5 #include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h"
6 6
7 #include "chrome/browser/views/location_bar/page_action_image_view.h" 7 #include "chrome/browser/ui/views/location_bar/page_action_image_view.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 9
10 PageActionWithBadgeView::PageActionWithBadgeView( 10 PageActionWithBadgeView::PageActionWithBadgeView(
11 PageActionImageView* image_view) { 11 PageActionImageView* image_view) {
12 image_view_ = image_view; 12 image_view_ = image_view;
13 AddChildView(image_view_); 13 AddChildView(image_view_);
14 } 14 }
15 15
16 AccessibilityTypes::Role PageActionWithBadgeView::GetAccessibleRole() { 16 AccessibilityTypes::Role PageActionWithBadgeView::GetAccessibleRole() {
17 return AccessibilityTypes::ROLE_GROUPING; 17 return AccessibilityTypes::ROLE_GROUPING;
(...skipping 12 matching lines...) Expand all
30 const SkBitmap& image = image_view()->GetImage(); 30 const SkBitmap& image = image_view()->GetImage();
31 int y = (image.height() + 1) % 2; // Even numbers: 1px padding. Odd: 0px. 31 int y = (image.height() + 1) % 2; // Even numbers: 1px padding. Odd: 0px.
32 image_view_->SetBounds(0, y, width(), height()); 32 image_view_->SetBounds(0, y, width(), height());
33 } 33 }
34 34
35 void PageActionWithBadgeView::UpdateVisibility(TabContents* contents, 35 void PageActionWithBadgeView::UpdateVisibility(TabContents* contents,
36 const GURL& url) { 36 const GURL& url) {
37 image_view_->UpdateVisibility(contents, url); 37 image_view_->UpdateVisibility(contents, url);
38 SetVisible(image_view_->IsVisible()); 38 SetVisible(image_view_->IsVisible());
39 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698