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

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

Issue 10535120: TabContentsWrapper -> TabContents, part 43. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 SetVisible(false); 73 SetVisible(false);
74 return; 74 return;
75 } 75 }
76 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 76 SetImage(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
77 content_setting_image_model_->get_icon())); 77 content_setting_image_model_->get_icon()));
78 SetTooltipText(UTF8ToUTF16(content_setting_image_model_->get_tooltip())); 78 SetTooltipText(UTF8ToUTF16(content_setting_image_model_->get_tooltip()));
79 SetVisible(true); 79 SetVisible(true);
80 80
81 TabSpecificContentSettings* content_settings = NULL; 81 TabSpecificContentSettings* content_settings = NULL;
82 if (web_contents) { 82 if (web_contents) {
83 content_settings = TabContents::GetOwningTabContentsForWebContents( 83 content_settings =
84 web_contents)->content_settings(); 84 TabContents::FromWebContents(web_contents)->content_settings();
85 } 85 }
86 if (!content_settings || content_settings->IsBlockageIndicated( 86 if (!content_settings || content_settings->IsBlockageIndicated(
87 content_setting_image_model_->get_content_settings_type())) 87 content_setting_image_model_->get_content_settings_type()))
88 return; 88 return;
89 89
90 // The content blockage was not yet indicated to the user. Start indication 90 // The content blockage was not yet indicated to the user. Start indication
91 // animation and clear "not yet shown" flag. 91 // animation and clear "not yet shown" flag.
92 content_settings->SetBlockageHasBeenIndicated( 92 content_settings->SetBlockageHasBeenIndicated(
93 content_setting_image_model_->get_content_settings_type()); 93 content_setting_image_model_->get_content_settings_type());
94 94
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 bubble_widget_->RemoveObserver(this); 256 bubble_widget_->RemoveObserver(this);
257 bubble_widget_ = NULL; 257 bubble_widget_ = NULL;
258 } 258 }
259 if (pause_animation_) { 259 if (pause_animation_) {
260 slide_animator_->Reset( 260 slide_animator_->Reset(
261 1.0 - (visible_text_size_ * kAnimatingFraction) / text_size_); 261 1.0 - (visible_text_size_ * kAnimatingFraction) / text_size_);
262 pause_animation_ = false; 262 pause_animation_ = false;
263 slide_animator_->Show(); 263 slide_animator_->Show();
264 } 264 }
265 } 265 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698