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

Side by Side Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc

Issue 2897533003: Change default ink drop center points to center of contents bounds (Closed)
Patch Set: fix compile Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser_non_client_frame_view_mus.h" 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/profiles/profiles_state.h" 9 #include "chrome/browser/profiles/profiles_state.h"
10 #include "chrome/browser/themes/theme_properties.h" 10 #include "chrome/browser/themes/theme_properties.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR), 480 canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR),
481 x + GetThemeBackgroundXInset(), y - bg_y, x, y, 481 x + GetThemeBackgroundXInset(), y - bg_y, x, y,
482 toolbar_bounds.width(), toolbar_bounds.height()); 482 toolbar_bounds.width(), toolbar_bounds.height());
483 } else { 483 } else {
484 canvas->FillRect(toolbar_bounds, 484 canvas->FillRect(toolbar_bounds,
485 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); 485 tp->GetColor(ThemeProperties::COLOR_TOOLBAR));
486 } 486 }
487 487
488 // Top stroke. 488 // Top stroke.
489 gfx::ScopedCanvas scoped_canvas(canvas); 489 gfx::ScopedCanvas scoped_canvas(canvas);
490 gfx::Rect tabstrip_bounds(GetBoundsForTabStrip(browser_view()->tabstrip())); 490 gfx::Rect tabstrip_bounds =
491 tabstrip_bounds.set_x(GetMirroredXForRect(tabstrip_bounds)); 491 GetMirroredRect(GetBoundsForTabStrip(browser_view()->tabstrip()));
492 canvas->ClipRect(tabstrip_bounds, SkClipOp::kDifference); 492 canvas->ClipRect(tabstrip_bounds, SkClipOp::kDifference);
493 const gfx::Rect separator_rect(toolbar_bounds.x(), tabstrip_bounds.bottom(), 493 const gfx::Rect separator_rect(toolbar_bounds.x(), tabstrip_bounds.bottom(),
494 toolbar_bounds.width(), 0); 494 toolbar_bounds.width(), 0);
495 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), 495 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(),
496 separator_rect, true); 496 separator_rect, true);
497 497
498 // Toolbar/content separator. 498 // Toolbar/content separator.
499 toolbar_bounds.Inset(kClientEdgeThickness, 0); 499 toolbar_bounds.Inset(kClientEdgeThickness, 0);
500 BrowserView::Paint1pxHorizontalLine( 500 BrowserView::Paint1pxHorizontalLine(
501 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), 501 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR),
(...skipping 15 matching lines...) Expand all
517 // TODO: move ash_layout_constants to ash/public/cpp. 517 // TODO: move ash_layout_constants to ash/public/cpp.
518 const bool restored = !frame()->IsMaximized() && !frame()->IsFullscreen(); 518 const bool restored = !frame()->IsMaximized() && !frame()->IsFullscreen();
519 return GetAshLayoutSize(restored 519 return GetAshLayoutSize(restored
520 ? AshLayoutSize::BROWSER_RESTORED_CAPTION_BUTTON 520 ? AshLayoutSize::BROWSER_RESTORED_CAPTION_BUTTON
521 : AshLayoutSize::BROWSER_MAXIMIZED_CAPTION_BUTTON) 521 : AshLayoutSize::BROWSER_MAXIMIZED_CAPTION_BUTTON)
522 .height(); 522 .height();
523 #else 523 #else
524 return views::WindowManagerFrameValues::instance().normal_insets.top(); 524 return views::WindowManagerFrameValues::instance().normal_insets.top();
525 #endif 525 #endif
526 } 526 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698