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

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

Issue 204026: Unified the color definitions for the dividers so that extension shelf is usi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/detachable_toolbar_view.h" 5 #include "chrome/browser/views/detachable_toolbar_view.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "chrome/browser/browser_theme_provider.h" 8 #include "chrome/browser/browser_theme_provider.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
11 11
12 // How round the 'new tab' style bookmarks bar is. 12 // How round the 'new tab' style bookmarks bar is.
13 static const int kNewtabBarRoundness = 5; 13 static const int kNewtabBarRoundness = 5;
14 14
15 const SkColor DetachableToolbarView::kEdgeDividerColor =
16 SkColorSetRGB(222, 234, 248);
17 const SkColor DetachableToolbarView::kMiddleDividerColor =
18 SkColorSetRGB(194, 205, 212);
19
15 // static 20 // static
16 void DetachableToolbarView::PaintBackgroundDetachedMode(gfx::Canvas* canvas, 21 void DetachableToolbarView::PaintBackgroundDetachedMode(gfx::Canvas* canvas,
17 views::View* view) { 22 views::View* view) {
18 int browser_height = view->GetParent()->GetBounds( 23 int browser_height = view->GetParent()->GetBounds(
19 views::View::APPLY_MIRRORING_TRANSFORMATION).height(); 24 views::View::APPLY_MIRRORING_TRANSFORMATION).height();
20 25
21 // Draw the background to match the new tab page. 26 // Draw the background to match the new tab page.
22 ThemeProvider* tp = view->GetThemeProvider(); 27 ThemeProvider* tp = view->GetThemeProvider();
23 canvas->FillRectInt(tp->GetColor(BrowserThemeProvider::COLOR_NTP_BACKGROUND), 28 canvas->FillRectInt(tp->GetColor(BrowserThemeProvider::COLOR_NTP_BACKGROUND),
24 0, 0, view->width(), view->height()); 29 0, 0, view->width(), view->height());
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 width / 2 - ntp_background->width() / 2, 258 width / 2 - ntp_background->width() / 2,
254 y_pos, ntp_background->width(), 259 y_pos, ntp_background->width(),
255 2 * height + ntp_background->height() + 5); 260 2 * height + ntp_background->height() + 5);
256 } else { 261 } else {
257 canvas->TileImageInt(*ntp_background, 262 canvas->TileImageInt(*ntp_background,
258 width / 2 - ntp_background->width() / 2, 263 width / 2 - ntp_background->width() / 2,
259 y_pos, ntp_background->width(), ntp_background->height()); 264 y_pos, ntp_background->width(), ntp_background->height());
260 } 265 }
261 } 266 }
262 } 267 }
OLDNEW
« no previous file with comments | « chrome/browser/views/detachable_toolbar_view.h ('k') | chrome/browser/views/extensions/extension_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698