| OLD | NEW |
| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 pause_animation_ = true; | 197 pause_animation_ = true; |
| 198 } | 198 } |
| 199 | 199 |
| 200 Profile* profile = parent_->profile(); | 200 Profile* profile = parent_->profile(); |
| 201 ContentSettingBubbleContents* bubble = new ContentSettingBubbleContents( | 201 ContentSettingBubbleContents* bubble = new ContentSettingBubbleContents( |
| 202 ContentSettingBubbleModel::CreateContentSettingBubbleModel( | 202 ContentSettingBubbleModel::CreateContentSettingBubbleModel( |
| 203 parent_->delegate()->GetContentSettingBubbleModelDelegate(), | 203 parent_->delegate()->GetContentSettingBubbleModelDelegate(), |
| 204 tab_contents, | 204 tab_contents, |
| 205 profile, | 205 profile, |
| 206 content_setting_image_model_->get_content_settings_type()), | 206 content_setting_image_model_->get_content_settings_type()), |
| 207 profile, | |
| 208 tab_contents->web_contents(), | 207 tab_contents->web_contents(), |
| 209 this, | 208 this, |
| 210 views::BubbleBorder::TOP_RIGHT); | 209 views::BubbleBorder::TOP_RIGHT); |
| 211 bubble_widget_ = parent_->delegate()->CreateViewsBubble(bubble); | 210 bubble_widget_ = parent_->delegate()->CreateViewsBubble(bubble); |
| 212 bubble_widget_->AddObserver(this); | 211 bubble_widget_->AddObserver(this); |
| 213 bubble->Show(); | 212 bubble->Show(); |
| 214 } | 213 } |
| 215 | 214 |
| 216 void ContentSettingImageView::OnPaint(gfx::Canvas* canvas) { | 215 void ContentSettingImageView::OnPaint(gfx::Canvas* canvas) { |
| 217 // During the animation we draw a border, an icon and the text. The text area | 216 // During the animation we draw a border, an icon and the text. The text area |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 return kBorderColor; | 292 return kBorderColor; |
| 294 } | 293 } |
| 295 | 294 |
| 296 SkColor ContentSettingImageView::GradientTopColor() const { | 295 SkColor ContentSettingImageView::GradientTopColor() const { |
| 297 return kTopBoxColor; | 296 return kTopBoxColor; |
| 298 } | 297 } |
| 299 | 298 |
| 300 SkColor ContentSettingImageView::GradientBottomColor() const { | 299 SkColor ContentSettingImageView::GradientBottomColor() const { |
| 301 return kBottomBoxColor; | 300 return kBottomBoxColor; |
| 302 } | 301 } |
| OLD | NEW |