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

Side by Side Diff: chrome/browser/views/info_bubble.cc

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/views/info_bubble.h ('k') | chrome/browser/views/infobars/infobars.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/info_bubble.h" 5 #include "chrome/browser/views/info_bubble.h"
6 6
7 #include "app/gfx/chrome_canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/path.h" 8 #include "app/gfx/path.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "app/win_util.h" 10 #include "app/win_util.h"
11 #include "base/win_util.h" 11 #include "base/win_util.h"
12 #include "chrome/browser/browser_window.h" 12 #include "chrome/browser/browser_window.h"
13 #include "chrome/browser/views/frame/browser_view.h" 13 #include "chrome/browser/views/frame/browser_view.h"
14 #include "chrome/common/notification_service.h" 14 #include "chrome/common/notification_service.h"
15 #include "chrome/common/notification_type.h" 15 #include "chrome/common/notification_type.h"
16 #include "grit/theme_resources.h" 16 #include "grit/theme_resources.h"
17 #include "views/widget/root_view.h" 17 #include "views/widget/root_view.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 // Bottom left corner. 331 // Bottom left corner.
332 mask.lineTo(corner_size, height - arrow_size); 332 mask.lineTo(corner_size, height - arrow_size);
333 mask.lineTo(0, height - corner_size - arrow_size); 333 mask.lineTo(0, height - corner_size - arrow_size);
334 } 334 }
335 335
336 mask.close(); 336 mask.close();
337 337
338 return mask.CreateHRGN(); 338 return mask.CreateHRGN();
339 } 339 }
340 340
341 void InfoBubble::ContentView::Paint(ChromeCanvas* canvas) { 341 void InfoBubble::ContentView::Paint(gfx::Canvas* canvas) {
342 int bubble_x = 0; 342 int bubble_x = 0;
343 int bubble_y = 0; 343 int bubble_y = 0;
344 int bubble_w = width(); 344 int bubble_w = width();
345 int bubble_h = height() - kArrowSize; 345 int bubble_h = height() - kArrowSize;
346 346
347 int border_w = bubble_w - 2 * kInfoBubbleCornerWidth; 347 int border_w = bubble_w - 2 * kInfoBubbleCornerWidth;
348 int border_h = bubble_h - 2 * kInfoBubbleCornerHeight; 348 int border_h = bubble_h - 2 * kInfoBubbleCornerHeight;
349 349
350 if (IsTop()) 350 if (IsTop())
351 bubble_y += kArrowSize; 351 bubble_y += kArrowSize;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 x -= kArrowXOffset; 427 x -= kArrowXOffset;
428 else 428 else
429 x = x + kArrowXOffset - pref.width(); 429 x = x + kArrowXOffset - pref.width();
430 if (IsTop()) { 430 if (IsTop()) {
431 y = position_relative_to.bottom() + kArrowToContentPadding; 431 y = position_relative_to.bottom() + kArrowToContentPadding;
432 } else { 432 } else {
433 y = position_relative_to.y() - kArrowToContentPadding - pref.height(); 433 y = position_relative_to.y() - kArrowToContentPadding - pref.height();
434 } 434 }
435 return gfx::Rect(x, y, pref.width(), pref.height()); 435 return gfx::Rect(x, y, pref.width(), pref.height());
436 } 436 }
OLDNEW
« no previous file with comments | « chrome/browser/views/info_bubble.h ('k') | chrome/browser/views/infobars/infobars.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698