Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/frame/glass_browser_frame_view.h" | 5 #include "chrome/browser/views/frame/glass_browser_frame_view.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
| 9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
| 10 #include "chrome/browser/browser_theme_provider.h" | 10 #include "chrome/browser/browser_theme_provider.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 328 right_x - (left_x + toolbar_left->width()), | 328 right_x - (left_x + toolbar_left->width()), |
| 329 toolbar_center->height()); | 329 toolbar_center->height()); |
| 330 | 330 |
| 331 // Right edge. | 331 // Right edge. |
| 332 canvas->DrawBitmapInt(*tp->GetBitmapNamed(IDR_CONTENT_TOP_RIGHT_CORNER), | 332 canvas->DrawBitmapInt(*tp->GetBitmapNamed(IDR_CONTENT_TOP_RIGHT_CORNER), |
| 333 right_x, toolbar_bounds.y()); | 333 right_x, toolbar_bounds.y()); |
| 334 } | 334 } |
| 335 | 335 |
| 336 // Draw the content/toolbar separator. | 336 // Draw the content/toolbar separator. |
| 337 canvas->DrawLineInt(ResourceBundle::toolbar_separator_color, | 337 canvas->DrawLineInt(ResourceBundle::toolbar_separator_color, |
| 338 toolbar_bounds.x(), toolbar_bounds.bottom() - 1, | 338 toolbar_bounds.x(), |
| 339 toolbar_bounds.right() - 1, toolbar_bounds.bottom() - 1); | 339 toolbar_bounds.bottom() - 1, |
|
Peter Kasting
2010/07/27 23:43:26
Nit: These 1s should probably be kClientEdgeThickn
| |
| 340 toolbar_bounds.right(), | |
| 341 toolbar_bounds.bottom() - 1); | |
| 340 } | 342 } |
| 341 | 343 |
| 342 void GlassBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) { | 344 void GlassBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) { |
| 343 if (!browser_view_->ShouldShowOffTheRecordAvatar()) | 345 if (!browser_view_->ShouldShowOffTheRecordAvatar()) |
| 344 return; | 346 return; |
| 345 | 347 |
| 346 SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon(); | 348 SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon(); |
| 347 int src_x = 0; | 349 int src_x = 0; |
| 348 int src_y = (otr_avatar_icon.height() - otr_avatar_bounds_.height()) / 2; | 350 int src_y = (otr_avatar_icon.height() - otr_avatar_bounds_.height()) / 2; |
| 349 int dst_x = MirroredLeftPointForRect(otr_avatar_bounds_); | 351 int dst_x = MirroredLeftPointForRect(otr_avatar_bounds_); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 517 static bool initialized = false; | 519 static bool initialized = false; |
| 518 if (!initialized) { | 520 if (!initialized) { |
| 519 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 521 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
| 520 for (int i = 0; i < kThrobberIconCount; ++i) { | 522 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 521 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); | 523 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); |
| 522 DCHECK(throbber_icons_[i]); | 524 DCHECK(throbber_icons_[i]); |
| 523 } | 525 } |
| 524 initialized = true; | 526 initialized = true; |
| 525 } | 527 } |
| 526 } | 528 } |
| OLD | NEW |