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

Side by Side Diff: chrome/browser/ui/views/fullscreen_exit_bubble.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/fullscreen_exit_bubble.h" 5 #include "chrome/browser/ui/views/fullscreen_exit_bubble.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/animation/slide_animation.h" 10 #include "ui/base/animation/slide_animation.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 rect.set(0, -padding, SkIntToScalar(width()), SkIntToScalar(height())); 94 rect.set(0, -padding, SkIntToScalar(width()), SkIntToScalar(height()));
95 SkScalar rad[8] = { 0, 0, 0, 0, padding, padding, padding, padding }; 95 SkScalar rad[8] = { 0, 0, 0, 0, padding, padding, padding, padding };
96 SkPath path; 96 SkPath path;
97 path.addRoundRect(rect, rad, SkPath::kCW_Direction); 97 path.addRoundRect(rect, rad, SkPath::kCW_Direction);
98 98
99 // Fill it black. 99 // Fill it black.
100 SkPaint paint; 100 SkPaint paint;
101 paint.setStyle(SkPaint::kFill_Style); 101 paint.setStyle(SkPaint::kFill_Style);
102 paint.setFlags(SkPaint::kAntiAlias_Flag); 102 paint.setFlags(SkPaint::kAntiAlias_Flag);
103 paint.setColor(SK_ColorBLACK); 103 paint.setColor(SK_ColorBLACK);
104 canvas->AsCanvasSkia()->drawPath(path, paint); 104 canvas->AsCanvasSkia()->skia_canvas()->drawPath(path, paint);
105 } 105 }
106 106
107 // FullscreenExitBubble -------------------------------------------------------- 107 // FullscreenExitBubble --------------------------------------------------------
108 108
109 const double FullscreenExitBubble::kOpacity = 0.7; 109 const double FullscreenExitBubble::kOpacity = 0.7;
110 const int FullscreenExitBubble::kInitialDelayMs = 2300; 110 const int FullscreenExitBubble::kInitialDelayMs = 2300;
111 const int FullscreenExitBubble::kIdleTimeMs = 2300; 111 const int FullscreenExitBubble::kIdleTimeMs = 2300;
112 const int FullscreenExitBubble::kPositionCheckHz = 10; 112 const int FullscreenExitBubble::kPositionCheckHz = 10;
113 const int FullscreenExitBubble::kSlideInRegionHeightPx = 4; 113 const int FullscreenExitBubble::kSlideInRegionHeightPx = 4;
114 const int FullscreenExitBubble::kSlideInDurationMs = 350; 114 const int FullscreenExitBubble::kSlideInDurationMs = 350;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 // NOTE: don't use the bounds of the root_view_. On linux changing window 253 // NOTE: don't use the bounds of the root_view_. On linux changing window
254 // size is async. Instead we use the size of the screen. 254 // size is async. Instead we use the size of the screen.
255 gfx::Rect screen_bounds = views::Screen::GetMonitorAreaNearestWindow( 255 gfx::Rect screen_bounds = views::Screen::GetMonitorAreaNearestWindow(
256 root_view_->GetWidget()->GetNativeView()); 256 root_view_->GetWidget()->GetNativeView());
257 gfx::Point origin(screen_bounds.x() + 257 gfx::Point origin(screen_bounds.x() +
258 (screen_bounds.width() - size.width()) / 2, 258 (screen_bounds.width() - size.width()) / 2,
259 screen_bounds.y()); 259 screen_bounds.y());
260 return gfx::Rect(origin, size); 260 return gfx::Rect(origin, size);
261 } 261 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/ui/views/infobars/extension_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698