OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 // So return what the tabstrip height _ought_ to be right now. | 425 // So return what the tabstrip height _ought_ to be right now. |
426 return IsTabStripVisible() ? tabstrip_->GetPreferredSize().height() : 0; | 426 return IsTabStripVisible() ? tabstrip_->GetPreferredSize().height() : 0; |
427 } | 427 } |
428 | 428 |
429 gfx::Point BrowserView::OffsetPointForToolbarBackgroundImage( | 429 gfx::Point BrowserView::OffsetPointForToolbarBackgroundImage( |
430 const gfx::Point& point) const { | 430 const gfx::Point& point) const { |
431 // The background image starts tiling horizontally at the window left edge and | 431 // The background image starts tiling horizontally at the window left edge and |
432 // vertically at the top edge of the horizontal tab strip (or where it would | 432 // vertically at the top edge of the horizontal tab strip (or where it would |
433 // be). We expect our parent's origin to be the window origin. | 433 // be). We expect our parent's origin to be the window origin. |
434 gfx::Point window_point(point.Add(GetMirroredPosition())); | 434 gfx::Point window_point(point.Add(GetMirroredPosition())); |
435 window_point.Offset(0, -frame_->GetHorizontalTabStripVerticalOffset(false)); | 435 window_point.Offset(0, -frame_->GetTabStripInsets(false).top); |
436 return window_point; | 436 return window_point; |
437 } | 437 } |
438 | 438 |
439 bool BrowserView::IsTabStripVisible() const { | 439 bool BrowserView::IsTabStripVisible() const { |
440 return browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP); | 440 return browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP); |
441 } | 441 } |
442 | 442 |
443 bool BrowserView::IsOffTheRecord() const { | 443 bool BrowserView::IsOffTheRecord() const { |
444 return browser_->profile()->IsOffTheRecord(); | 444 return browser_->profile()->IsOffTheRecord(); |
445 } | 445 } |
(...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2583 if (contents && contents->GetContentNativeView() && | 2583 if (contents && contents->GetContentNativeView() && |
2584 contents->GetContentNativeView()->HasFocus()) { | 2584 contents->GetContentNativeView()->HasFocus()) { |
2585 (contents->GetRenderViewHost()->*method)(); | 2585 (contents->GetRenderViewHost()->*method)(); |
2586 return true; | 2586 return true; |
2587 } | 2587 } |
2588 #elif defined(OS_WIN) | 2588 #elif defined(OS_WIN) |
2589 // TODO(yusukes): Support non-Aura Windows. | 2589 // TODO(yusukes): Support non-Aura Windows. |
2590 #endif | 2590 #endif |
2591 return false; | 2591 return false; |
2592 } | 2592 } |
OLD | NEW |