diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 00:25:49 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 00:25:49 +0000 |
commit | 68b8b022d6e13600abcd680886d9bacbdf672a2b (patch) | |
tree | dd9de19c01243292d308084e645f1d03a2103947 /chrome/browser/chromeos/browser_extenders.cc | |
parent | 272cfa02655aeb460d99c6b5c913b01c26bc6dfc (diff) | |
download | chromium_src-68b8b022d6e13600abcd680886d9bacbdf672a2b.zip chromium_src-68b8b022d6e13600abcd680886d9bacbdf672a2b.tar.gz chromium_src-68b8b022d6e13600abcd680886d9bacbdf672a2b.tar.bz2 |
fixes for
crash/non responsive issue in compact navbar.
crash when adding tab.
new command line switch to start chrome in chromeos layout.
changed accelerator to toggle compact navbar to ctrl-shit-c.
-0 does not work on chromeos for some reason.
BUG=chromium-os:1010, 30612
TEST=None
Review URL: http://codereview.chromium.org/500043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/browser_extenders.cc')
-rw-r--r-- | chrome/browser/chromeos/browser_extenders.cc | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/browser_extenders.cc b/chrome/browser/chromeos/browser_extenders.cc index 910bbe9..dbf9acb 100644 --- a/chrome/browser/chromeos/browser_extenders.cc +++ b/chrome/browser/chromeos/browser_extenders.cc @@ -6,6 +6,7 @@ #include "app/menus/simple_menu_model.h" #include "app/theme_provider.h" +#include "base/command_line.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/chromeos/compact_location_bar.h" #include "chrome/browser/chromeos/compact_navigation_bar.h" @@ -18,6 +19,7 @@ #include "chrome/browser/views/tabs/tab_overview_types.h" #include "chrome/browser/views/tabs/tab_strip.h" #include "chrome/browser/views/toolbar_view.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/x11_util.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -97,7 +99,9 @@ class NormalExtender : public BrowserExtender, // means it's possible for us not to be able to get the name of the window // manager. We assume that when this happens we're on Chrome OS. force_maximized_window_ = (!wm_name_valid || - wm_name == kChromeOsWindowManagerName); + wm_name == kChromeOsWindowManagerName || + CommandLine::ForCurrentProcess()->HasSwitch( + switches::kChromeosFrame)); } } @@ -115,11 +119,18 @@ class NormalExtender : public BrowserExtender, status_area_->SetVisible(true); } + /* TODO(oshima): + * Disabling the ability to update location bar on re-layout bacause + * tabstrip state may not be in sync with the browser's state when + * new tab is added. We should decide when we know more about this + * feature. May be we should simply hide the location? + * Filed a bug: http://crbug.com/30612. if (compact_navigation_bar_->IsVisible()) { // Update the size and location of the compact location bar. compact_location_bar_->UpdateBounds( browser_view()->tabstrip()->GetSelectedTab()); } + */ // Layout main menu before tab strip. gfx::Size main_menu_size = main_menu_->GetPreferredSize(); @@ -136,8 +147,13 @@ class NormalExtender : public BrowserExtender, if (compact_navigation_bar_->IsVisible()) { gfx::Size cnb_bounds = compact_navigation_bar_->GetPreferredSize(); - compact_navigation_bar_->SetBounds(curx, bounds.y(), - cnb_bounds.width(), bounds.height()); + // This (+1/-1) is a quick hack for the bug + // http://code.google.com/p/chromium-os/issues/detail?id=1010 + // while investigating the issue. It could be in gtk or around + // NativeViewHostGtk::CreateFixed, but it will take some time. + compact_navigation_bar_->SetBounds(curx, bounds.y() + 1, + cnb_bounds.width(), + bounds.height() - 1); curx += cnb_bounds.width(); width -= cnb_bounds.width(); } |