| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 554 |
| 555 bool BrowserView::IsOffTheRecord() const { | 555 bool BrowserView::IsOffTheRecord() const { |
| 556 return browser_->profile()->IsOffTheRecord(); | 556 return browser_->profile()->IsOffTheRecord(); |
| 557 } | 557 } |
| 558 | 558 |
| 559 bool BrowserView::IsGuestSession() const { | 559 bool BrowserView::IsGuestSession() const { |
| 560 return browser_->profile()->IsGuestSession(); | 560 return browser_->profile()->IsGuestSession(); |
| 561 } | 561 } |
| 562 | 562 |
| 563 bool BrowserView::IsRegularOrGuestSession() const { | 563 bool BrowserView::IsRegularOrGuestSession() const { |
| 564 Profile* profile = browser_->profile(); | 564 return profiles::IsRegularOrGuestSession(browser_.get()); |
| 565 return (profile->IsGuestSession() || !profile->IsOffTheRecord()); | |
| 566 } | 565 } |
| 567 | 566 |
| 568 int BrowserView::GetOTRIconResourceID() const { | 567 int BrowserView::GetOTRIconResourceID() const { |
| 569 int otr_resource_id = IDR_OTR_ICON; | 568 int otr_resource_id = IDR_OTR_ICON; |
| 570 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { | 569 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { |
| 571 if (IsFullscreen()) | 570 if (IsFullscreen()) |
| 572 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; | 571 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; |
| 573 #if defined(OS_WIN) | 572 #if defined(OS_WIN) |
| 574 if (win8::IsSingleWindowMetroMode()) | 573 if (win8::IsSingleWindowMetroMode()) |
| 575 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; | 574 otr_resource_id = IDR_OTR_ICON_FULLSCREEN; |
| (...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2562 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2564 gfx::Point icon_bottom( | 2563 gfx::Point icon_bottom( |
| 2565 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2564 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2566 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2565 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2567 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2566 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2568 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2567 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2569 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2568 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2570 } | 2569 } |
| 2571 return top_arrow_height; | 2570 return top_arrow_height; |
| 2572 } | 2571 } |
| OLD | NEW |