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

Unified Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 6692001: Add in DOMBrowserView and Frame related classes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index b89ce632c211dc851969df1299b4e207fabfb750..42482d13b943b2bc641e59e0cca028797e3db63e 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -387,7 +387,7 @@ bool OpaqueBrowserFrameView::HitTest(const gfx::Point& l) const {
// Otherwise claim it only if it's in a non-tab portion of the tabstrip.
bool vertical_tabs = browser_view_->UseVerticalTabs();
- gfx::Rect tabstrip_bounds = browser_view_->tabstrip()->bounds();
+ gfx::Rect tabstrip_bounds = GetBoundsForTabStrip(browser_view_->tabstrip());
gfx::Point tabstrip_origin(tabstrip_bounds.origin());
View::ConvertPointToView(frame_->GetWindow()->client_view(),
this, &tabstrip_origin);
@@ -447,6 +447,28 @@ SkBitmap OpaqueBrowserFrameView::GetFavIconForTabIconView() {
}
///////////////////////////////////////////////////////////////////////////////
+// OpaqueBrowserFrameView, protected:
+
+void OpaqueBrowserFrameView::LayoutOTRAvatar() {
+ SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon();
+ int otr_bottom, otr_restored_y;
+ if (browser_view_->UseVerticalTabs()) {
+ otr_bottom = NonClientTopBorderHeight(false, false) - kOTRBottomSpacing;
+ otr_restored_y = kFrameShadowThickness;
+ } else {
+ otr_bottom = GetHorizontalTabStripVerticalOffset(false) +
+ browser_view_->GetTabStripHeight() - kOTRBottomSpacing;
+ otr_restored_y = otr_bottom - otr_avatar_icon.height();
+ }
+ int otr_y = frame_->GetWindow()->IsMaximized() ?
+ (NonClientTopBorderHeight(false, true) + kTabstripTopShadowThickness) :
+ otr_restored_y;
+ otr_avatar_bounds_.SetRect(NonClientBorderThickness() + kOTRSideSpacing,
+ otr_y, otr_avatar_icon.width(),
+ browser_view_->ShouldShowOffTheRecordAvatar() ? (otr_bottom - otr_y) : 0);
+}
+
+///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, private:
int OpaqueBrowserFrameView::FrameBorderThickness(bool restored) const {
@@ -1046,25 +1068,6 @@ void OpaqueBrowserFrameView::LayoutTitleBar() {
}
}
-void OpaqueBrowserFrameView::LayoutOTRAvatar() {
- SkBitmap otr_avatar_icon = browser_view_->GetOTRAvatarIcon();
- int otr_bottom, otr_restored_y;
- if (browser_view_->UseVerticalTabs()) {
- otr_bottom = NonClientTopBorderHeight(false, false) - kOTRBottomSpacing;
- otr_restored_y = kFrameShadowThickness;
- } else {
- otr_bottom = GetHorizontalTabStripVerticalOffset(false) +
- browser_view_->GetTabStripHeight() - kOTRBottomSpacing;
- otr_restored_y = otr_bottom - otr_avatar_icon.height();
- }
- int otr_y = frame_->GetWindow()->IsMaximized() ?
- (NonClientTopBorderHeight(false, true) + kTabstripTopShadowThickness) :
- otr_restored_y;
- otr_avatar_bounds_.SetRect(NonClientBorderThickness() + kOTRSideSpacing,
- otr_y, otr_avatar_icon.width(),
- browser_view_->ShouldShowOffTheRecordAvatar() ? (otr_bottom - otr_y) : 0);
-}
-
gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
int height) const {
int top_height = NonClientTopBorderHeight(false, false);

Powered by Google App Engine
This is Rietveld 408576698