OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/frame/glass_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 return GetSystemMetrics(SM_CYSIZEFRAME) + | 273 return GetSystemMetrics(SM_CYSIZEFRAME) + |
274 ((!restored && browser_view()->IsMaximized()) ? | 274 ((!restored && browser_view()->IsMaximized()) ? |
275 -kTabstripTopShadowThickness : kNonClientRestoredExtraThickness); | 275 -kTabstripTopShadowThickness : kNonClientRestoredExtraThickness); |
276 } | 276 } |
277 | 277 |
278 void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) { | 278 void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) { |
279 ui::ThemeProvider* tp = GetThemeProvider(); | 279 ui::ThemeProvider* tp = GetThemeProvider(); |
280 | 280 |
281 gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds()); | 281 gfx::Rect toolbar_bounds(browser_view()->GetToolbarBounds()); |
282 gfx::Point toolbar_origin(toolbar_bounds.origin()); | 282 gfx::Point toolbar_origin(toolbar_bounds.origin()); |
283 View::ConvertPointToView(browser_view(), this, &toolbar_origin); | 283 View::ConvertPointToTarget(browser_view(), this, &toolbar_origin); |
284 toolbar_bounds.set_origin(toolbar_origin); | 284 toolbar_bounds.set_origin(toolbar_origin); |
285 int x = toolbar_bounds.x(); | 285 int x = toolbar_bounds.x(); |
286 int w = toolbar_bounds.width(); | 286 int w = toolbar_bounds.width(); |
287 int left_x = x - kContentEdgeShadowThickness; | 287 int left_x = x - kContentEdgeShadowThickness; |
288 | 288 |
289 // TODO(kuan): migrate background animation from cros to win by calling | 289 // TODO(kuan): migrate background animation from cros to win by calling |
290 // GetToolbarBackgound* with the correct mode, refer to | 290 // GetToolbarBackgound* with the correct mode, refer to |
291 // BrowserNonClientFrameViewAsh. | 291 // BrowserNonClientFrameViewAsh. |
292 gfx::ImageSkia* theme_toolbar = browser_view()->GetToolbarBackgroundImage( | 292 gfx::ImageSkia* theme_toolbar = browser_view()->GetToolbarBackgroundImage( |
293 browser_view()->browser()->search_model()->mode().mode); | 293 browser_view()->browser()->search_model()->mode().mode); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 static bool initialized = false; | 520 static bool initialized = false; |
521 if (!initialized) { | 521 if (!initialized) { |
522 for (int i = 0; i < kThrobberIconCount; ++i) { | 522 for (int i = 0; i < kThrobberIconCount; ++i) { |
523 throbber_icons_[i] = | 523 throbber_icons_[i] = |
524 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 524 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
525 DCHECK(throbber_icons_[i]); | 525 DCHECK(throbber_icons_[i]); |
526 } | 526 } |
527 initialized = true; | 527 initialized = true; |
528 } | 528 } |
529 } | 529 } |
OLD | NEW |