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

Unified Diff: chrome/browser/chromeos/frame/browser_view.cc

Issue 6692001: Add in DOMBrowserView and Frame related classes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed DOMBrowserFrame* classes and added changes in line with oshima's comments 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/webui/login/browser/dom_browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/frame/browser_view.cc
diff --git a/chrome/browser/chromeos/frame/browser_view.cc b/chrome/browser/chromeos/frame/browser_view.cc
index f41ccfc3e82b915734e0d67e7f2131606080ab97..84938f3746bc088951821d2efdeaea320eec578d 100644
--- a/chrome/browser/chromeos/frame/browser_view.cc
+++ b/chrome/browser/chromeos/frame/browser_view.cc
@@ -165,21 +165,21 @@ class BrowserViewLayout : public ::BrowserViewLayout {
// The toolbar is promoted to the title for vertical tabs.
bool toolbar_visible = browser_view_->IsToolbarVisible();
- toolbar_->SetVisible(toolbar_visible);
int toolbar_height = 0;
- if (toolbar_visible)
- toolbar_height = toolbar_->GetPreferredSize().height();
- int tabstrip_max_x = tabstrip_->bounds().right();
- toolbar_->SetBounds(tabstrip_max_x,
- bounds.y() - kVerticalTabStripToolbarOffset,
- browser_view_->width() - tabstrip_max_x,
- toolbar_height);
-
+ if (toolbar_) {
+ toolbar_->SetVisible(toolbar_visible);
+ if (toolbar_visible)
+ toolbar_height = toolbar_->GetPreferredSize().height();
+ int tabstrip_max_x = tabstrip_->bounds().right();
+ toolbar_->SetBounds(tabstrip_max_x,
+ bounds.y() - kVerticalTabStripToolbarOffset,
+ browser_view_->width() - tabstrip_max_x,
+ toolbar_height);
+ }
// Adjust the available bounds for other components.
gfx::Rect available_bounds = vertical_layout_rect();
available_bounds.Inset(tabstrip_w, 0, 0, 0);
set_vertical_layout_rect(available_bounds);
-
return bounds.y() + toolbar_height;
}
@@ -237,7 +237,8 @@ void BrowserView::Init() {
gtk_frame->non_client_view()->SetContextMenuController(this);
// Listen to wrench menu opens.
- toolbar()->AddMenuListener(this);
+ if (toolbar())
+ toolbar()->AddMenuListener(this);
// Make sure the window is set to the right type.
std::vector<int> params;
« no previous file with comments | « no previous file | chrome/browser/chromeos/webui/login/browser/dom_browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698