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

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

Issue 934503002: Ash frames: dark frames now use white caption buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_header_painter_ash.h" 5 #include "chrome/browser/ui/views/frame/browser_header_painter_ash.h"
6 6
7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" 7 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h"
8 #include "ash/frame/header_painter_util.h" 8 #include "ash/frame/header_painter_util.h"
9 #include "base/logging.h" // DCHECK 9 #include "base/logging.h" // DCHECK
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 IDR_ASH_BROWSER_WINDOW_CONTROL_BACKGROUND_MAXIMIZED_P; 399 IDR_ASH_BROWSER_WINDOW_CONTROL_BACKGROUND_MAXIMIZED_P;
400 } else { 400 } else {
401 hover_background_id = 401 hover_background_id =
402 IDR_ASH_BROWSER_WINDOW_CONTROL_BACKGROUND_RESTORED_H; 402 IDR_ASH_BROWSER_WINDOW_CONTROL_BACKGROUND_RESTORED_H;
403 pressed_background_id = 403 pressed_background_id =
404 IDR_ASH_BROWSER_WINDOW_CONTROL_BACKGROUND_RESTORED_P; 404 IDR_ASH_BROWSER_WINDOW_CONTROL_BACKGROUND_RESTORED_P;
405 } 405 }
406 caption_button_container_->SetButtonImages( 406 caption_button_container_->SetButtonImages(
407 ash::CAPTION_BUTTON_ICON_MINIMIZE, 407 ash::CAPTION_BUTTON_ICON_MINIMIZE,
408 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_MINIMIZE, 408 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_MINIMIZE,
409 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_MINIMIZE,
410 hover_background_id, 409 hover_background_id,
411 pressed_background_id); 410 pressed_background_id);
412 411
413 int size_icon_id = 0; 412 int size_icon_id = 0;
414 if (frame_->IsMaximized() || frame_->IsFullscreen()) 413 if (frame_->IsMaximized() || frame_->IsFullscreen())
415 size_icon_id = IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_RESTORE; 414 size_icon_id = IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_RESTORE;
416 else 415 else
417 size_icon_id = IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_MAXIMIZE; 416 size_icon_id = IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_MAXIMIZE;
418 caption_button_container_->SetButtonImages( 417 caption_button_container_->SetButtonImages(
419 ash::CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE, 418 ash::CAPTION_BUTTON_ICON_MAXIMIZE_RESTORE,
420 size_icon_id, 419 size_icon_id,
421 size_icon_id,
422 hover_background_id, 420 hover_background_id,
423 pressed_background_id); 421 pressed_background_id);
424 422
425 caption_button_container_->SetButtonImages( 423 caption_button_container_->SetButtonImages(
426 ash::CAPTION_BUTTON_ICON_CLOSE, 424 ash::CAPTION_BUTTON_ICON_CLOSE,
427 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_CLOSE, 425 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_CLOSE,
428 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_CLOSE,
429 hover_background_id, 426 hover_background_id,
430 pressed_background_id); 427 pressed_background_id);
431 caption_button_container_->SetButtonImages( 428 caption_button_container_->SetButtonImages(
432 ash::CAPTION_BUTTON_ICON_LEFT_SNAPPED, 429 ash::CAPTION_BUTTON_ICON_LEFT_SNAPPED,
433 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_LEFT_SNAPPED, 430 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_LEFT_SNAPPED,
434 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_LEFT_SNAPPED,
435 hover_background_id, 431 hover_background_id,
436 pressed_background_id); 432 pressed_background_id);
437 caption_button_container_->SetButtonImages( 433 caption_button_container_->SetButtonImages(
438 ash::CAPTION_BUTTON_ICON_RIGHT_SNAPPED, 434 ash::CAPTION_BUTTON_ICON_RIGHT_SNAPPED,
439 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_RIGHT_SNAPPED, 435 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_RIGHT_SNAPPED,
440 IDR_ASH_BROWSER_WINDOW_CONTROL_ICON_RIGHT_SNAPPED,
441 hover_background_id, 436 hover_background_id,
442 pressed_background_id); 437 pressed_background_id);
443 } 438 }
444 439
445 gfx::Rect BrowserHeaderPainterAsh::GetPaintedBounds() const { 440 gfx::Rect BrowserHeaderPainterAsh::GetPaintedBounds() const {
446 return gfx::Rect(view_->width(), painted_height_); 441 return gfx::Rect(view_->width(), painted_height_);
447 } 442 }
448 443
449 gfx::Rect BrowserHeaderPainterAsh::GetTitleBounds() const { 444 gfx::Rect BrowserHeaderPainterAsh::GetTitleBounds() const {
450 return ash::HeaderPainterUtil::GetTitleBounds(window_icon_, 445 return ash::HeaderPainterUtil::GetTitleBounds(window_icon_,
451 caption_button_container_, BrowserFrame::GetTitleFontList()); 446 caption_button_container_, BrowserFrame::GetTitleFontList());
452 } 447 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698