Chromium Code Reviews| 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 548 } | 548 } |
| 549 | 549 |
| 550 bool BrowserView::IsGuestSession() const { | 550 bool BrowserView::IsGuestSession() const { |
| 551 return browser_->profile()->IsGuestSession(); | 551 return browser_->profile()->IsGuestSession(); |
| 552 } | 552 } |
| 553 | 553 |
| 554 bool BrowserView::IsRegularOrGuestSession() const { | 554 bool BrowserView::IsRegularOrGuestSession() const { |
| 555 return profiles::IsRegularOrGuestSession(browser_.get()); | 555 return profiles::IsRegularOrGuestSession(browser_.get()); |
| 556 } | 556 } |
| 557 | 557 |
| 558 int BrowserView::GetOTRIconResourceID() const { | 558 int BrowserView::GetOTRIconResourceID() const { |
|
sky
2014/04/24 03:29:02
Can you remove this function and replace with IDR_
oshima
2014/04/25 14:16:26
Done.
| |
| 559 if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH && IsFullscreen()) | |
| 560 return IDR_OTR_ICON_FULLSCREEN; | |
| 561 return IDR_OTR_ICON; | 559 return IDR_OTR_ICON; |
| 562 } | 560 } |
| 563 | 561 |
| 564 int BrowserView::GetGuestIconResourceID() const { | 562 int BrowserView::GetGuestIconResourceID() const { |
| 565 return IDR_LOGIN_GUEST; | 563 return IDR_LOGIN_GUEST; |
| 566 } | 564 } |
| 567 | 565 |
| 568 bool BrowserView::ShouldShowAvatar() const { | 566 bool BrowserView::ShouldShowAvatar() const { |
| 569 #if defined(OS_CHROMEOS) | 567 #if defined(OS_CHROMEOS) |
| 570 if (!browser_->is_type_tabbed() && !browser_->is_app()) | 568 if (!browser_->is_type_tabbed() && !browser_->is_app()) |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2556 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2554 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2557 gfx::Point icon_bottom( | 2555 gfx::Point icon_bottom( |
| 2558 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2556 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2559 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2557 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2560 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2558 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2561 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2559 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2562 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2560 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2563 } | 2561 } |
| 2564 return top_arrow_height; | 2562 return top_arrow_height; |
| 2565 } | 2563 } |
| OLD | NEW |