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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2615 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2617 gfx::Point icon_bottom( | 2616 gfx::Point icon_bottom( |
2618 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2617 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2619 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2618 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2620 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2619 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2621 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2620 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2622 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2621 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2623 } | 2622 } |
2624 return top_arrow_height; | 2623 return top_arrow_height; |
2625 } | 2624 } |
OLD | NEW |