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

Side by Side Diff: chrome/browser/ui/views/bubble/bubble_border.cc

Issue 7584007: make bubble_border to use resources under ui/resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix missing ui_resources_standard dependencies Created 9 years, 4 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/bubble/bubble_border.h" 5 #include "chrome/browser/ui/views/bubble/bubble_border.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "grit/theme_resources.h" 8 #include "grit/ui_resources.h"
9 #include "grit/theme_resources_standard.h" 9 #include "grit/ui_resources_standard.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
11 #include "ui/base/resource/resource_bundle.h" 11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/canvas_skia.h" 12 #include "ui/gfx/canvas_skia.h"
13 #include "ui/gfx/path.h" 13 #include "ui/gfx/path.h"
14 14
15 // static 15 // static
16 SkBitmap* BubbleBorder::left_ = NULL; 16 SkBitmap* BubbleBorder::left_ = NULL;
17 SkBitmap* BubbleBorder::top_left_ = NULL; 17 SkBitmap* BubbleBorder::top_left_ = NULL;
18 SkBitmap* BubbleBorder::top_ = NULL; 18 SkBitmap* BubbleBorder::top_ = NULL;
19 SkBitmap* BubbleBorder::top_right_ = NULL; 19 SkBitmap* BubbleBorder::top_right_ = NULL;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 paint.setColor(border_->background_color()); 435 paint.setColor(border_->background_color());
436 gfx::Path path; 436 gfx::Path path;
437 gfx::Rect bounds(view->GetContentsBounds()); 437 gfx::Rect bounds(view->GetContentsBounds());
438 SkRect rect; 438 SkRect rect;
439 rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()), 439 rect.set(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()),
440 SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom())); 440 SkIntToScalar(bounds.right()), SkIntToScalar(bounds.bottom()));
441 SkScalar radius = SkIntToScalar(BubbleBorder::GetCornerRadius()); 441 SkScalar radius = SkIntToScalar(BubbleBorder::GetCornerRadius());
442 path.addRoundRect(rect, radius, radius); 442 path.addRoundRect(rect, radius, radius);
443 canvas->AsCanvasSkia()->drawPath(path, paint); 443 canvas->AsCanvasSkia()->drawPath(path, paint);
444 } 444 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698