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

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

Issue 10519008: Enlarge size of touch target for several location bar buttons without affecting visual layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge to LKGR Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/location_bar/content_setting_image_view.h" 5 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 9 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" 10 #include "chrome/browser/ui/content_settings/content_setting_image_model.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 LocationBarView* parent) 51 LocationBarView* parent)
52 : content_setting_image_model_( 52 : content_setting_image_model_(
53 ContentSettingImageModel::CreateContentSettingImageModel( 53 ContentSettingImageModel::CreateContentSettingImageModel(
54 content_type)), 54 content_type)),
55 bubble_widget_(NULL), 55 bubble_widget_(NULL),
56 parent_(parent), 56 parent_(parent),
57 pause_animation_(false), 57 pause_animation_(false),
58 text_size_(0), 58 text_size_(0),
59 visible_text_size_(0) { 59 visible_text_size_(0) {
60 SetHorizontalAlignment(ImageView::LEADING); 60 SetHorizontalAlignment(ImageView::LEADING);
61 TouchableLocationBarView::Init(this);
61 } 62 }
62 63
63 ContentSettingImageView::~ContentSettingImageView() { 64 ContentSettingImageView::~ContentSettingImageView() {
64 if (bubble_widget_) { 65 if (bubble_widget_) {
65 bubble_widget_->RemoveObserver(this); 66 bubble_widget_->RemoveObserver(this);
66 bubble_widget_ = NULL; 67 bubble_widget_ = NULL;
67 } 68 }
68 } 69 }
69 70
70 void ContentSettingImageView::UpdateFromWebContents(WebContents* web_contents) { 71 void ContentSettingImageView::UpdateFromWebContents(WebContents* web_contents) {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 bubble_widget_->RemoveObserver(this); 257 bubble_widget_->RemoveObserver(this);
257 bubble_widget_ = NULL; 258 bubble_widget_ = NULL;
258 } 259 }
259 if (pause_animation_) { 260 if (pause_animation_) {
260 slide_animator_->Reset( 261 slide_animator_->Reset(
261 1.0 - (visible_text_size_ * kAnimatingFraction) / text_size_); 262 1.0 - (visible_text_size_ * kAnimatingFraction) / text_size_);
262 pause_animation_ = false; 263 pause_animation_ = false;
263 slide_animator_->Show(); 264 slide_animator_->Show();
264 } 265 }
265 } 266 }
267
268 int ContentSettingImageView::GetBuiltInHorizontalPadding() const {
269 return GetBuiltInHorizontalPaddingImpl();
270 }
271
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698