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

Side by Side Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/gtk/location_bar_view_gtk.h" 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 public BubbleDelegateGtk { 176 public BubbleDelegateGtk {
177 public: 177 public:
178 ContentSettingImageViewGtk(ContentSettingsType content_type, 178 ContentSettingImageViewGtk(ContentSettingsType content_type,
179 LocationBarViewGtk* parent); 179 LocationBarViewGtk* parent);
180 virtual ~ContentSettingImageViewGtk(); 180 virtual ~ContentSettingImageViewGtk();
181 181
182 // PageToolViewGtk 182 // PageToolViewGtk
183 virtual void UpdatePreLayout(WebContents* web_contents) OVERRIDE; 183 virtual void UpdatePreLayout(WebContents* web_contents) OVERRIDE;
184 virtual void UpdatePostLayout(WebContents* web_contents) OVERRIDE; 184 virtual void UpdatePostLayout(WebContents* web_contents) OVERRIDE;
185 185
186 // ui::AnimationDelegate 186 // gfx::AnimationDelegate
187 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 187 virtual void AnimationEnded(const gfx::Animation* animation) OVERRIDE;
188 188
189 private: 189 private:
190 // PageToolViewGtk 190 // PageToolViewGtk
191 virtual GdkColor button_border_color() const OVERRIDE; 191 virtual GdkColor button_border_color() const OVERRIDE;
192 virtual GdkColor gradient_top_color() const OVERRIDE; 192 virtual GdkColor gradient_top_color() const OVERRIDE;
193 virtual GdkColor gradient_bottom_color() const OVERRIDE; 193 virtual GdkColor gradient_bottom_color() const OVERRIDE;
194 virtual void OnClick(GtkWidget* sender) OVERRIDE; 194 virtual void OnClick(GtkWidget* sender) OVERRIDE;
195 195
196 // BubbleDelegateGtk 196 // BubbleDelegateGtk
197 virtual void BubbleClosing(BubbleGtk* bubble, 197 virtual void BubbleClosing(BubbleGtk* bubble,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 if (!content_settings->IsBlockageIndicated( 281 if (!content_settings->IsBlockageIndicated(
282 content_setting_image_model_->get_content_settings_type())) { 282 content_setting_image_model_->get_content_settings_type())) {
283 if (content_setting_image_model_->ShouldShowBubbleOnBlockage()) 283 if (content_setting_image_model_->ShouldShowBubbleOnBlockage())
284 CreateBubble(web_contents); 284 CreateBubble(web_contents);
285 content_settings->SetBlockageHasBeenIndicated( 285 content_settings->SetBlockageHasBeenIndicated(
286 content_setting_image_model_->get_content_settings_type()); 286 content_setting_image_model_->get_content_settings_type());
287 } 287 }
288 } 288 }
289 289
290 void ContentSettingImageViewGtk::AnimationEnded( 290 void ContentSettingImageViewGtk::AnimationEnded(
291 const ui::Animation* animation) { 291 const gfx::Animation* animation) {
292 if (animation_.IsShowing()) { 292 if (animation_.IsShowing()) {
293 base::MessageLoop::current()->PostDelayedTask( 293 base::MessageLoop::current()->PostDelayedTask(
294 FROM_HERE, 294 FROM_HERE,
295 base::Bind(&ContentSettingImageViewGtk::CloseAnimation, 295 base::Bind(&ContentSettingImageViewGtk::CloseAnimation,
296 weak_factory_.GetWeakPtr()), 296 weak_factory_.GetWeakPtr()),
297 base::TimeDelta::FromMilliseconds(kContentSettingImageDisplayTime)); 297 base::TimeDelta::FromMilliseconds(kContentSettingImageDisplayTime));
298 } else { 298 } else {
299 gtk_widget_hide(label_.get()); 299 gtk_widget_hide(label_.get());
300 gtk_util::StopActingAsRoundedWindow(event_box_.get()); 300 gtk_util::StopActingAsRoundedWindow(event_box_.get());
301 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE); 301 gtk_event_box_set_visible_window(GTK_EVENT_BOX(event_box_.get()), FALSE);
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 gtk_widget_show(label_.get()); 1803 gtk_widget_show(label_.get());
1804 1804
1805 animation_.Show(); 1805 animation_.Show();
1806 } 1806 }
1807 1807
1808 void LocationBarViewGtk::PageToolViewGtk::CloseAnimation() { 1808 void LocationBarViewGtk::PageToolViewGtk::CloseAnimation() {
1809 animation_.Hide(); 1809 animation_.Hide();
1810 } 1810 }
1811 1811
1812 void LocationBarViewGtk::PageToolViewGtk::AnimationProgressed( 1812 void LocationBarViewGtk::PageToolViewGtk::AnimationProgressed(
1813 const ui::Animation* animation) { 1813 const gfx::Animation* animation) {
1814 gtk_widget_set_size_request( 1814 gtk_widget_set_size_request(
1815 label_.get(), 1815 label_.get(),
1816 animation->GetCurrentValue() * label_req_.width, 1816 animation->GetCurrentValue() * label_req_.width,
1817 -1); 1817 -1);
1818 } 1818 }
1819 1819
1820 void LocationBarViewGtk::PageToolViewGtk::AnimationEnded( 1820 void LocationBarViewGtk::PageToolViewGtk::AnimationEnded(
1821 const ui::Animation* animation) { 1821 const gfx::Animation* animation) {
1822 } 1822 }
1823 1823
1824 void LocationBarViewGtk::PageToolViewGtk::AnimationCanceled( 1824 void LocationBarViewGtk::PageToolViewGtk::AnimationCanceled(
1825 const ui::Animation* animation) { 1825 const gfx::Animation* animation) {
1826 } 1826 }
1827 1827
1828 gboolean LocationBarViewGtk::PageToolViewGtk::OnButtonPressed( 1828 gboolean LocationBarViewGtk::PageToolViewGtk::OnButtonPressed(
1829 GtkWidget* sender, GdkEvent* event) { 1829 GtkWidget* sender, GdkEvent* event) {
1830 OnClick(sender); 1830 OnClick(sender);
1831 return TRUE; 1831 return TRUE;
1832 } 1832 }
1833 1833
1834 gboolean LocationBarViewGtk::PageToolViewGtk::OnExpose( 1834 gboolean LocationBarViewGtk::PageToolViewGtk::OnExpose(
1835 GtkWidget* sender, GdkEventExpose* event) { 1835 GtkWidget* sender, GdkEventExpose* event) {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 } 2177 }
2178 2178
2179 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( 2179 void LocationBarViewGtk::PageActionViewGtk::InspectPopup(
2180 ExtensionAction* action) { 2180 ExtensionAction* action) {
2181 ExtensionPopupGtk::Show( 2181 ExtensionPopupGtk::Show(
2182 action->GetPopupUrl(current_tab_id_), 2182 action->GetPopupUrl(current_tab_id_),
2183 owner_->browser_, 2183 owner_->browser_,
2184 event_box_.get(), 2184 event_box_.get(),
2185 ExtensionPopupGtk::SHOW_AND_INSPECT); 2185 ExtensionPopupGtk::SHOW_AND_INSPECT);
2186 } 2186 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | chrome/browser/ui/gtk/notifications/balloon_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698