diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-22 16:59:24 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-22 16:59:24 +0000 |
commit | ea87eee46258f8a3a75a2d244342b50721e4fb9d (patch) | |
tree | 239760d7015a95cad5e8ed2eeb25a55d3fa85bc7 /chrome/browser/views/new_browser_window_widget.cc | |
parent | b1d963d60e08720fab32ea5d582e636895feb0d7 (diff) | |
download | chromium_src-ea87eee46258f8a3a75a2d244342b50721e4fb9d.zip chromium_src-ea87eee46258f8a3a75a2d244342b50721e4fb9d.tar.gz chromium_src-ea87eee46258f8a3a75a2d244342b50721e4fb9d.tar.bz2 |
Removes tab overview related classes and renames TabOverviewTypes to
WmIpc.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/646079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/new_browser_window_widget.cc')
-rw-r--r-- | chrome/browser/views/new_browser_window_widget.cc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/chrome/browser/views/new_browser_window_widget.cc b/chrome/browser/views/new_browser_window_widget.cc deleted file mode 100644 index 7cc3950..0000000 --- a/chrome/browser/views/new_browser_window_widget.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/views/new_browser_window_widget.h" - -#include "app/resource_bundle.h" -#include "chrome/browser/browser.h" -#include "chrome/browser/browser_window.h" -#include "chrome/browser/metrics/user_metrics.h" -#include "chrome/browser/profile.h" -#include "chrome/browser/views/tabs/tab_overview_types.h" -#include "chrome/common/page_transition_types.h" -#include "googleurl/src/gurl.h" -#include "grit/theme_resources.h" -#include "views/controls/button/image_button.h" -#include "views/fill_layout.h" -#include "views/widget/root_view.h" -#include "views/widget/widget_gtk.h" - -NewBrowserWindowWidget::NewBrowserWindowWidget(Profile* profile) - : profile_(profile), - widget_(NULL) { - views::ImageButton* button = new views::ImageButton(this); - button->SetImage(views::CustomButton::BS_NORMAL, - ResourceBundle::GetSharedInstance().GetBitmapNamed( - IDR_NEW_BROWSER_WINDOW_ICON)); - gfx::Size pref = button->GetPreferredSize(); - views::WidgetGtk* widget = - new views::WidgetGtk(views::WidgetGtk::TYPE_WINDOW); - widget->MakeTransparent(); - widget->Init(NULL, gfx::Rect(0, 0, pref.width(), pref.height())); - TabOverviewTypes::instance()->SetWindowType( - widget->GetNativeView(), - TabOverviewTypes::WINDOW_TYPE_CREATE_BROWSER_WINDOW, - NULL); - widget->GetRootView()->SetLayoutManager(new views::FillLayout()); - widget->GetRootView()->AddChildView(button); - widget_ = widget; - widget->Show(); -} - -NewBrowserWindowWidget::~NewBrowserWindowWidget() { - widget_->Close(); - widget_ = NULL; -} - -void NewBrowserWindowWidget::ButtonPressed( - views::Button* sender, const views::Event& event) { - UserMetrics::RecordAction("TabOverview_PressedCreateNewBrowserButton", - profile_); - - Browser* browser = Browser::Create(profile_); - browser->AddTabWithURL(GURL(), GURL(), PageTransition::START_PAGE, - true, -1, false, NULL); - browser->window()->Show(); -} |