diff options
Diffstat (limited to 'chrome/browser/views/frame/browser_view.cc')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 35fb7b8..01ff721 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -138,16 +138,6 @@ BrowserView::~BrowserView() { ticker_.UnregisterTickHandler(&hung_window_detector_); } -// static -BrowserWindow* BrowserView::GetBrowserWindowForHWND(HWND window) { - if (IsWindow(window)) { - HANDLE data = GetProp(window, kBrowserWindowKey); - if (data) - return reinterpret_cast<BrowserWindow*>(data); - } - return NULL; -} - int BrowserView::GetShowState() const { STARTUPINFO si = {0}; si.cb = sizeof(si); @@ -197,7 +187,7 @@ bool BrowserView::IsOffTheRecord() const { } bool BrowserView::ShouldShowOffTheRecordAvatar() const { - return IsOffTheRecord() && browser_->type() == Browser::TYPE_NORMAL; + return IsOffTheRecord() && browser_->type() == BrowserType::TABBED_BROWSER; } bool BrowserView::AcceleratorPressed(const views::Accelerator& accelerator) { @@ -291,13 +281,13 @@ bool BrowserView::SupportsWindowFeature(WindowFeature feature) const { } // static -unsigned int BrowserView::FeaturesForBrowserType(Browser::Type type) { +unsigned int BrowserView::FeaturesForBrowserType(BrowserType::Type type) { unsigned int features = FEATURE_INFOBAR | FEATURE_DOWNLOADSHELF; - if (type == Browser::TYPE_NORMAL) + if (type == BrowserType::TABBED_BROWSER) features |= FEATURE_TABSTRIP | FEATURE_TOOLBAR | FEATURE_BOOKMARKBAR; - if (type != Browser::TYPE_APP) + if (type != BrowserType::APPLICATION) features |= FEATURE_LOCATIONBAR; - if (type != Browser::TYPE_NORMAL) + if (type != BrowserType::TABBED_BROWSER) features |= FEATURE_TITLEBAR; return features; } @@ -696,7 +686,7 @@ bool BrowserView::ShouldShowWindowTitle() const { } SkBitmap BrowserView::GetWindowIcon() { - if (browser_->type() == Browser::TYPE_APP) + if (browser_->type() == BrowserType::APPLICATION) return browser_->GetCurrentPageIcon(); return SkBitmap(); } @@ -735,7 +725,7 @@ void BrowserView::SaveWindowPlacement(const gfx::Rect& bounds, bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const { *bounds = browser_->GetSavedWindowBounds(); - if (browser_->type() == Browser::TYPE_POPUP) { + if (browser_->type() == BrowserType::BROWSER) { // We are a popup window. The value passed in |bounds| represents two // pieces of information: // - the position of the window, in screen coordinates (outer position). @@ -976,7 +966,7 @@ void BrowserView::InitSystemMenu() { int insertion_index = std::max(0, system_menu_->ItemCount() - 1); // We add the menu items in reverse order so that insertion_index never needs // to change. - if (browser_->type() == Browser::TYPE_NORMAL) { + if (browser_->type() == BrowserType::TABBED_BROWSER) { system_menu_->AddSeparator(insertion_index); system_menu_->AddMenuItemWithLabel(insertion_index, IDC_TASKMANAGER, l10n_util::GetString(IDS_TASKMANAGER)); |