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

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

Issue 115309: Remove even more ATL dependencies. (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
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/bookmark_table_view.h" 5 #include "chrome/browser/views/bookmark_table_view.h"
6 6
7 #include <commctrl.h>
8
7 #include "app/drag_drop_types.h" 9 #include "app/drag_drop_types.h"
8 #include "app/gfx/chrome_canvas.h" 10 #include "app/gfx/chrome_canvas.h"
9 #include "app/gfx/chrome_font.h" 11 #include "app/gfx/chrome_font.h"
10 #include "app/os_exchange_data.h" 12 #include "app/os_exchange_data.h"
11 #include "app/resource_bundle.h" 13 #include "app/resource_bundle.h"
12 #include "base/base_drag_source.h" 14 #include "base/base_drag_source.h"
13 #include "chrome/browser/bookmarks/bookmark_utils.h" 15 #include "chrome/browser/bookmarks/bookmark_utils.h"
14 #include "chrome/browser/bookmarks/bookmark_model.h" 16 #include "chrome/browser/bookmarks/bookmark_model.h"
15 #include "chrome/browser/bookmarks/bookmark_table_model.h" 17 #include "chrome/browser/bookmarks/bookmark_table_model.h"
16 #include "chrome/browser/profile.h" 18 #include "chrome/browser/profile.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 canvas.DrawStringWithHalo(alt_text_, font, SK_ColorDKGRAY, SK_ColorWHITE, 1, 425 canvas.DrawStringWithHalo(alt_text_, font, SK_ColorDKGRAY, SK_ColorWHITE, 1,
424 1, bounds.width() - 2, bounds.height() - 2, 426 1, bounds.width() - 2, bounds.height() - 2,
425 l10n_util::DefaultCanvasTextAlignment()); 427 l10n_util::DefaultCanvasTextAlignment());
426 canvas.getTopPlatformDevice().drawToHDC(dc, bounds.x(), bounds.y(), NULL); 428 canvas.getTopPlatformDevice().drawToHDC(dc, bounds.x(), bounds.y(), NULL);
427 ReleaseDC(GetNativeControlHWND(), dc); 429 ReleaseDC(GetNativeControlHWND(), dc);
428 } 430 }
429 431
430 gfx::Rect BookmarkTableView::GetAltTextBounds() { 432 gfx::Rect BookmarkTableView::GetAltTextBounds() {
431 static const int kXOffset = 16; 433 static const int kXOffset = 16;
432 DCHECK(GetNativeControlHWND()); 434 DCHECK(GetNativeControlHWND());
433 CRect client_rect; 435 RECT client_rect_rect;
434 GetClientRect(GetNativeControlHWND(), client_rect); 436 GetClientRect(GetNativeControlHWND(), &client_rect_rect);
437 gfx::Rect client_rect(client_rect_rect);
435 ChromeFont font = GetAltTextFont(); 438 ChromeFont font = GetAltTextFont();
436 // Pad height by 2 for halo. 439 // Pad height by 2 for halo.
437 return gfx::Rect(kXOffset, content_offset(), client_rect.Width() - kXOffset, 440 return gfx::Rect(kXOffset, content_offset(), client_rect.width() - kXOffset,
438 std::max(kImageSize, font.height() + 2)); 441 std::max(kImageSize, font.height() + 2));
439 } 442 }
440 443
441 ChromeFont BookmarkTableView::GetAltTextFont() { 444 ChromeFont BookmarkTableView::GetAltTextFont() {
442 return ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont); 445 return ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont);
443 } 446 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_menu_button.cc ('k') | chrome/browser/views/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698