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

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

Issue 13866033: Animate the fullscreen exit bubble's opacity instead of its bounds when in immersive fullscreen (Closed) Base URL: http://git.chromium.org/chromium/src.git@exit_bubble
Patch Set: Created 7 years, 8 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
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/gtk/fullscreen_exit_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 9 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
10 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 10 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 void FullscreenExitBubbleGtk::Show() { 220 void FullscreenExitBubbleGtk::Show() {
221 slide_widget_->Open(); 221 slide_widget_->Open();
222 } 222 }
223 223
224 bool FullscreenExitBubbleGtk::IsAnimating() { 224 bool FullscreenExitBubbleGtk::IsAnimating() {
225 return slide_widget_->IsAnimating(); 225 return slide_widget_->IsAnimating();
226 } 226 }
227 227
228 bool FullscreenExitBubbleGtk::CanMouseTriggerSlideIn() const {
229 return true;
230 }
231
228 void FullscreenExitBubbleGtk::StartWatchingMouseIfNecessary() { 232 void FullscreenExitBubbleGtk::StartWatchingMouseIfNecessary() {
229 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_)) 233 if (!fullscreen_bubble::ShowButtonsForType(bubble_type_))
230 StartWatchingMouse(); 234 StartWatchingMouse();
231 } 235 }
232 236
233 void FullscreenExitBubbleGtk::OnSetFloatingPosition( 237 void FullscreenExitBubbleGtk::OnSetFloatingPosition(
234 GtkWidget* floating_container, 238 GtkWidget* floating_container,
235 GtkAllocation* allocation) { 239 GtkAllocation* allocation) {
236 GtkRequisition bubble_size; 240 GtkRequisition bubble_size;
237 gtk_widget_size_request(widget(), &bubble_size); 241 gtk_widget_size_request(widget(), &bubble_size);
(...skipping 26 matching lines...) Expand all
264 void FullscreenExitBubbleGtk::Observe( 268 void FullscreenExitBubbleGtk::Observe(
265 int type, 269 int type,
266 const content::NotificationSource& source, 270 const content::NotificationSource& source,
267 const content::NotificationDetails& details) { 271 const content::NotificationDetails& details) {
268 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED); 272 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSER_THEME_CHANGED);
269 if (theme_service_->UsingNativeTheme()) 273 if (theme_service_->UsingNativeTheme())
270 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, NULL); 274 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, NULL);
271 else 275 else
272 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, &kBackgroundColor); 276 gtk_widget_modify_bg(bubble_, GTK_STATE_NORMAL, &kBackgroundColor);
273 } 277 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698