| 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 MirroredLeftPointForRect(toolbar_bounds), |
| 339 toolbar_bounds.right() - 1, toolbar_bounds.bottom() - 1); | 339 toolbar_bounds.bottom() - 1, |
| 340 MirroredLeftPointForRect(toolbar_bounds) + |
| 341 toolbar_bounds.width(), |
| 342 toolbar_bounds.bottom() - 1); |
| 340 } | 343 } |
| 341 | 344 |
| 342 void GlassBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) { | 345 void GlassBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) { |
| 343 if (!browser_view_->ShouldShowOffTheRecordAvatar()) | 346 if (!browser_view_->ShouldShowOffTheRecordAvatar()) |
| 344 return; | 347 return; |
| 345 | 348 |
| 346 SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon(); | 349 SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon(); |
| 347 int src_x = 0; | 350 int src_x = 0; |
| 348 int src_y = (otr_avatar_icon.height() - otr_avatar_bounds_.height()) / 2; | 351 int src_y = (otr_avatar_icon.height() - otr_avatar_bounds_.height()) / 2; |
| 349 int dst_x = MirroredLeftPointForRect(otr_avatar_bounds_); | 352 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; | 520 static bool initialized = false; |
| 518 if (!initialized) { | 521 if (!initialized) { |
| 519 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 522 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
| 520 for (int i = 0; i < kThrobberIconCount; ++i) { | 523 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 521 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); | 524 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); |
| 522 DCHECK(throbber_icons_[i]); | 525 DCHECK(throbber_icons_[i]); |
| 523 } | 526 } |
| 524 initialized = true; | 527 initialized = true; |
| 525 } | 528 } |
| 526 } | 529 } |
| OLD | NEW |