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

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

Issue 7112034: Committing http://codereview.chromium.org/7084022/ for Satoshi Matsuzaki. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 // Allow customization of these attributes. 730 // Allow customization of these attributes.
731 SkBitmap* left = NULL; 731 SkBitmap* left = NULL;
732 SkBitmap* right = NULL; 732 SkBitmap* right = NULL;
733 int top_offset = 0; 733 int top_offset = 0;
734 ModifyMaximizedFramePainting(&top_offset, &left, &right); 734 ModifyMaximizedFramePainting(&top_offset, &left, &right);
735 735
736 // Never theme app and popup windows. 736 // Never theme app and popup windows.
737 if (!browser_view_->IsBrowserTypeNormal()) { 737 if (!browser_view_->IsBrowserTypeNormal()) {
738 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 738 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
739 theme_frame = rb.GetBitmapNamed(ShouldPaintAsActive() ? 739 bool is_incognito = browser_view_->IsOffTheRecord();
740 IDR_FRAME : IDR_FRAME_INACTIVE); 740 if (ShouldPaintAsActive()) {
741 theme_frame = rb.GetBitmapNamed(is_incognito ?
742 IDR_THEME_FRAME_INCOGNITO : IDR_FRAME);
743 } else {
744 theme_frame = rb.GetBitmapNamed(is_incognito ?
745 IDR_THEME_FRAME_INCOGNITO_INACTIVE :
746 IDR_FRAME_INACTIVE);
747 }
741 } else if (!browser_view_->IsOffTheRecord()) { 748 } else if (!browser_view_->IsOffTheRecord()) {
742 theme_frame = tp->GetBitmapNamed(ShouldPaintAsActive() ? 749 theme_frame = tp->GetBitmapNamed(ShouldPaintAsActive() ?
743 IDR_THEME_FRAME : IDR_THEME_FRAME_INACTIVE); 750 IDR_THEME_FRAME : IDR_THEME_FRAME_INACTIVE);
744 } else { 751 } else {
745 theme_frame = tp->GetBitmapNamed(ShouldPaintAsActive() ? 752 theme_frame = tp->GetBitmapNamed(ShouldPaintAsActive() ?
746 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME_INCOGNITO_INACTIVE); 753 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME_INCOGNITO_INACTIVE);
747 } 754 }
748 // Draw the theme frame. It must be aligned with the tabstrip as if we were 755 // Draw the theme frame. It must be aligned with the tabstrip as if we were
749 // in restored mode. Note that the top of the tabstrip is 756 // in restored mode. Note that the top of the tabstrip is
750 // kTabstripTopShadowThickness px off the top of the screen. 757 // kTabstripTopShadowThickness px off the top of the screen.
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 std::max(0, width - (2 * border_thickness)), 1205 std::max(0, width - (2 * border_thickness)),
1199 std::max(0, height - GetReservedHeight() - 1206 std::max(0, height - GetReservedHeight() -
1200 top_height - border_thickness)); 1207 top_height - border_thickness));
1201 } 1208 }
1202 1209
1203 void OpaqueBrowserFrameView::RegisterLoginNotifications() { 1210 void OpaqueBrowserFrameView::RegisterLoginNotifications() {
1204 PrefService* pref_service = browser_view_->browser()->profile()->GetPrefs(); 1211 PrefService* pref_service = browser_view_->browser()->profile()->GetPrefs();
1205 DCHECK(pref_service); 1212 DCHECK(pref_service);
1206 username_pref_.Init(prefs::kGoogleServicesUsername, pref_service, this); 1213 username_pref_.Init(prefs::kGoogleServicesUsername, pref_service, this);
1207 } 1214 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698