diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-16 18:05:07 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-16 18:05:07 +0000 |
commit | e08d6e5435ecea68d27292606c8b478bf06c2713 (patch) | |
tree | 943c653a61ed8d342f4a48a7a9ca7e41dd316cab /chrome | |
parent | ccef7aa07e895d3a68359608715f85109c367bef (diff) | |
download | chromium_src-e08d6e5435ecea68d27292606c8b478bf06c2713.zip chromium_src-e08d6e5435ecea68d27292606c8b478bf06c2713.tar.gz chromium_src-e08d6e5435ecea68d27292606c8b478bf06c2713.tar.bz2 |
Remove --apps-panel switch.
Also remove AppLauncher class (it's not used anymore).
BUG=56236,57371
TEST=build and ran it.
Review URL: http://codereview.chromium.org/3852001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 16 | ||||
-rw-r--r-- | chrome/browser/browser.h | 5 | ||||
-rw-r--r-- | chrome/browser/chromeos/frame/browser_view.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_install_ui.cc | 17 | ||||
-rw-r--r-- | chrome/browser/views/app_launcher.cc | 372 | ||||
-rw-r--r-- | chrome/browser/views/app_launcher.h | 139 | ||||
-rw-r--r-- | chrome/browser/views/tabs/browser_tab_strip_controller.cc | 4 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 6 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
10 files changed, 4 insertions, 560 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 6cb7321..b2ff5fc 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -120,7 +120,6 @@ #include "chrome/browser/shell_integration.h" #include "chrome/browser/task_manager/task_manager.h" #include "chrome/browser/view_ids.h" -#include "chrome/browser/views/app_launcher.h" #include "chrome/browser/views/location_bar/location_bar_view.h" #endif // OS_WIN @@ -133,7 +132,6 @@ #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/login_library.h" #include "chrome/browser/chromeos/options/language_config_view.h" -#include "chrome/browser/views/app_launcher.h" #endif using base::TimeDelta; @@ -1149,17 +1147,6 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) { command_updater_.UpdateCommandEnabled(IDC_TOGGLE_VERTICAL_TABS, show_main_ui); } -bool Browser::OpenAppsPanelAsNewTab() { -#if defined(OS_CHROMEOS) || defined(OS_WIN) - CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kAppsPanel)) { - AppLauncher::ShowForNewTab(this, std::string()); - return true; - } -#endif - return false; -} - /////////////////////////////////////////////////////////////////////////////// // Browser, Assorted browser commands: @@ -1348,9 +1335,6 @@ void Browser::CloseWindow() { void Browser::NewTab() { UserMetrics::RecordAction(UserMetricsAction("NewTab"), profile_); - if (OpenAppsPanelAsNewTab()) - return; - if (type() == TYPE_NORMAL) { AddBlankTab(true); } else { diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 0457ae7..a040498 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -445,11 +445,6 @@ class Browser : public TabHandlerDelegate, // will call this method. void UpdateCommandsForFullscreenMode(bool is_fullscreen); - // Opens the apps panel as a result of a new tab creation, if the browser is - // configured in that mode. Returns true if the apps panel was opened, false - // otherwise. - bool OpenAppsPanelAsNewTab(); - // Assorted browser commands //////////////////////////////////////////////// // NOTE: Within each of the following sections, the IDs are ordered roughly by diff --git a/chrome/browser/chromeos/frame/browser_view.cc b/chrome/browser/chromeos/frame/browser_view.cc index 22a8b92..89100b1 100644 --- a/chrome/browser/chromeos/frame/browser_view.cc +++ b/chrome/browser/chromeos/frame/browser_view.cc @@ -18,7 +18,6 @@ #include "chrome/browser/chromeos/status/status_area_view.h" #include "chrome/browser/chromeos/view_ids.h" #include "chrome/browser/chromeos/wm_ipc.h" -#include "chrome/browser/views/app_launcher.h" #include "chrome/browser/views/frame/browser_frame_gtk.h" #include "chrome/browser/views/frame/browser_view.h" #include "chrome/browser/views/frame/browser_view_layout.h" diff --git a/chrome/browser/extensions/extension_install_ui.cc b/chrome/browser/extensions/extension_install_ui.cc index b6ef578..b1b2205 100644 --- a/chrome/browser/extensions/extension_install_ui.cc +++ b/chrome/browser/extensions/extension_install_ui.cc @@ -37,7 +37,6 @@ #endif #if defined(TOOLKIT_VIEWS) -#include "chrome/browser/views/app_launcher.h" #include "chrome/browser/views/extensions/extension_installed_bubble.h" #endif @@ -138,18 +137,10 @@ void ExtensionInstallUI::OnInstallSuccess(Extension* extension) { std::string hash_params = "app-id="; hash_params += extension->id(); - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsPanel)) { -#if defined(TOOLKIT_VIEWS) - AppLauncher::ShowForNewTab(browser, hash_params); -#else - NOTREACHED(); -#endif - } else { - std::string url(chrome::kChromeUINewTabURL); - url += "/#"; - url += hash_params; - browser->AddSelectedTabWithURL(GURL(url), PageTransition::TYPED); - } + std::string url(chrome::kChromeUINewTabURL); + url += "/#"; + url += hash_params; + browser->AddSelectedTabWithURL(GURL(url), PageTransition::TYPED); return; } diff --git a/chrome/browser/views/app_launcher.cc b/chrome/browser/views/app_launcher.cc deleted file mode 100644 index fb2bf50..0000000 --- a/chrome/browser/views/app_launcher.cc +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (c) 2010 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/app_launcher.h" - -#include <string> -#include <vector> - -#include "base/message_loop.h" -#include "base/string_util.h" -#include "base/utf_string_conversions.h" -#include "chrome/app/chrome_dll_resource.h" -#include "chrome/browser/browser.h" -#include "chrome/browser/profile.h" -#include "chrome/browser/tabs/tab_strip_model.h" -#include "chrome/browser/view_ids.h" -#include "chrome/browser/views/dom_view.h" -#include "chrome/browser/views/info_bubble.h" -#include "chrome/browser/views/frame/browser_view.h" -#include "chrome/browser/views/location_bar/location_bar_view.h" -#include "chrome/common/url_constants.h" -#include "views/widget/root_view.h" - -#if defined(OS_CHROMEOS) -#include "chrome/browser/chromeos/status/status_area_view.h" -#endif - -namespace { - -// Padding between the navigation bar and the render view contents. -const int kNavigationBarBottomPadding = 3; - -// NavigationBar constants. -const int kNavigationBarBorderThickness = 1; - -// The speed in pixels per milli-second at which the animation should progress. -// It is easier to use a speed than a duration as the contents may report -// several changes in size over-time. -const double kAnimationSpeedPxPerMS = 1.5; - -const SkColor kBorderColor = SkColorSetRGB(205, 201, 201); - -// Returns the location bar view of |browser|. -static views::View* GetBrowserLocationBar(Browser* browser) { - BrowserView* browser_view = static_cast<BrowserView*>(browser->window()); - views::RootView* root_view = views::Widget::GetWidgetFromNativeWindow( - browser_view->GetNativeHandle())->GetRootView(); - return root_view->GetViewByID(VIEW_ID_LOCATION_BAR); -} - -} // namespace - -// InfoBubbleContentsView -// -// The view that contains the navigation bar and DOMUI. -// It is displayed in an info-bubble. - -class InfoBubbleContentsView : public views::View, - public LocationBarView::Delegate, - public CommandUpdater::CommandUpdaterDelegate { - public: - explicit InfoBubbleContentsView(AppLauncher* app_launcher); - ~InfoBubbleContentsView(); - - // Computes and sets the preferred size for the InfoBubbleContentsView based - // on the preferred size of the DOMUI contents specified. - void ComputePreferredSize(const gfx::Size& dom_view_preferred_size); - - // Sets the initial focus. - // Should be called when the bubble that contains us is shown. - void BubbleShown(); - - // Returns the TabContents displaying the contents for this bubble. - TabContents* GetBubbleTabContents(); - - // views::View override: - virtual gfx::Size GetPreferredSize(); - virtual void Layout(); - virtual void ViewHierarchyChanged(bool is_add, - views::View* parent, - views::View* child); - - // LocationBarView::Delegate implementation: - - // WARNING: this is not the TabContents of the bubble! Use - // GetBubbleTabContents() to get the bubble's TabContents. - virtual TabContents* GetTabContents(); - virtual InstantController* GetInstant() { return NULL; } - virtual void OnInputInProgress(bool in_progress) {} - - // CommandUpdater::CommandUpdaterDelegate implementation: - virtual void ExecuteCommand(int id); - - private: - // The application launcher displaying this info bubble. - AppLauncher* app_launcher_; - - // The location bar. - LocationBarView* location_bar_; - - // The view containing the renderer view. - DOMView* dom_view_; - - // The preferred size for this view (at which it fits its contents). - gfx::Size preferred_size_; - - // CommandUpdater the location bar sends commands to. - CommandUpdater command_updater_; - - // The width of the browser's location bar. - int browser_location_bar_width_; - - DISALLOW_COPY_AND_ASSIGN(InfoBubbleContentsView); -}; - -InfoBubbleContentsView::InfoBubbleContentsView(AppLauncher* app_launcher) - : app_launcher_(app_launcher), - location_bar_(NULL), - dom_view_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST(command_updater_(this)) { - // Allow the location bar to open URLs. - command_updater_.UpdateCommandEnabled(IDC_OPEN_CURRENT_URL, true); - DCHECK(app_launcher); - - browser_location_bar_width_ = - GetBrowserLocationBar(app_launcher->browser())->width(); -} - -InfoBubbleContentsView::~InfoBubbleContentsView() { -} - -void InfoBubbleContentsView::ComputePreferredSize( - const gfx::Size& dom_view_preferred_size) { - preferred_size_ = dom_view_preferred_size; - - // Add the padding and location bar height. - preferred_size_.Enlarge( - 0, location_bar_->height() + kNavigationBarBottomPadding); - - // Make sure the width is at least the browser location bar width. - if (preferred_size_.width() < browser_location_bar_width_) - preferred_size_.set_width(browser_location_bar_width_); -} - -void InfoBubbleContentsView::BubbleShown() { - location_bar_->RequestFocus(); -} - -TabContents* InfoBubbleContentsView::GetBubbleTabContents() { - return dom_view_->tab_contents(); -} - -void InfoBubbleContentsView::ViewHierarchyChanged( - bool is_add, views::View* parent, views::View* child) { - if (!is_add || child != this) - return; - - DCHECK(!dom_view_); - dom_view_ = new DOMView(); - AddChildView(dom_view_); - // We pass NULL for site instance so the renderer uses its own process. - dom_view_->Init(app_launcher_->browser()->profile(), NULL); - // We make the AppLauncher the TabContents delegate so we get notifications - // from the page to open links. - dom_view_->tab_contents()->set_delegate(app_launcher_); - GURL url(chrome::kChromeUIAppLauncherURL); - std::string ref = url.ref(); - if (!app_launcher_->hash_params().empty()) { - if (!ref.empty()) - ref += "&"; - ref += app_launcher_->hash_params(); - - url_canon::Replacements<char> replacements; - replacements.SetRef(ref.c_str(), url_parse::Component(0, ref.size())); - url = url.ReplaceComponents(replacements); - } - dom_view_->LoadURL(url); - - Browser* browser = app_launcher_->browser(); - location_bar_ = new LocationBarView(browser->profile(), - &command_updater_, - browser->toolbar_model(), - this, - LocationBarView::APP_LAUNCHER); - - location_bar_->set_border( - views::Border::CreateSolidBorder(kNavigationBarBorderThickness, - kBorderColor)); - AddChildView(location_bar_); - location_bar_->Init(); - // Size the location to its preferred size so ComputePreferredSize() computes - // the right size. - location_bar_->SizeToPreferredSize(); - ComputePreferredSize(gfx::Size(browser_location_bar_width_, 0)); - Layout(); -} - -TabContents* InfoBubbleContentsView::GetTabContents() { - return app_launcher_->browser()->GetSelectedTabContents(); -} - -gfx::Size InfoBubbleContentsView::GetPreferredSize() { - return preferred_size_; -} - -void InfoBubbleContentsView::Layout() { - if (bounds().IsEmpty() || GetChildViewCount() == 0) - return; - - gfx::Rect bounds = GetLocalBounds(false); - // The browser's location bar uses vertical padding that we need to take into - // account to match its height. - int location_bar_height = location_bar_->GetPreferredSize().height() - - LocationBarView::kVerticalEdgeThickness; - location_bar_->SetBounds(bounds.x(), bounds.y(), bounds.width(), - location_bar_height); - int render_y = location_bar_->bounds().bottom() + kNavigationBarBottomPadding; - dom_view_->SetBounds(0, render_y, - width(), app_launcher_->contents_pref_size_.height()); -} - -void InfoBubbleContentsView::ExecuteCommand(int id) { - // The user navigated by typing or selecting an entry in the location bar. - DCHECK_EQ(IDC_OPEN_CURRENT_URL, id); - GURL url(WideToUTF8(location_bar_->GetInputString())); - app_launcher_->AddTabWithURL(url, location_bar_->GetPageTransition()); - app_launcher_->Hide(); -} - -//////////////////////////////////////////////////////////////////////////////// -// AppLauncher - -AppLauncher::AppLauncher(Browser* browser) - : browser_(browser), - info_bubble_(NULL) { - DCHECK(browser); - info_bubble_content_ = new InfoBubbleContentsView(this); -#if defined(OS_WIN) - animate_ = true; - animation_.reset(new SlideAnimation(this)); - animation_->SetTweenType(Tween::LINEAR); -#else - animate_ = false; -#endif -} - -AppLauncher::~AppLauncher() { -} - -// static -AppLauncher* AppLauncher::Show(Browser* browser, - const gfx::Rect& bounds, - const gfx::Point& bubble_anchor, - const std::string& hash_params) { - AppLauncher* app_launcher = new AppLauncher(browser); - BrowserView* browser_view = static_cast<BrowserView*>(browser->window()); - app_launcher->hash_params_ = hash_params; - app_launcher->info_bubble_ = - PinnedContentsInfoBubble::Show(browser_view->GetWidget(), - bounds, BubbleBorder::TOP_LEFT, bubble_anchor, - app_launcher->info_bubble_content_, app_launcher); - app_launcher->info_bubble_content_->BubbleShown(); - - // TODO(finnur): Change this so that we only fade out when the user launches - // something from the bubble. This will fade out on dismiss as well. - app_launcher->info_bubble_->set_fade_away_on_close(true); - return app_launcher; -} - -// static -AppLauncher* AppLauncher::ShowForNewTab(Browser* browser, - const std::string& hash_params) { - BrowserView* browser_view = static_cast<BrowserView*>(browser->window()); - TabStrip* tabstrip = browser_view->tabstrip()->AsTabStrip(); - if (!tabstrip) - return NULL; - gfx::Rect bounds = tabstrip->GetNewTabButtonBounds(); - gfx::Point origin = bounds.origin(); - views::RootView::ConvertPointToScreen(tabstrip, &origin); - bounds.set_origin(origin); - - // Figure out where the location bar is, so we can pin the bubble to - // make our url bar appear exactly over it. - views::View* location_bar = GetBrowserLocationBar(browser); - gfx::Point location_bar_origin = location_bar->bounds().origin(); - views::RootView::ConvertPointToScreen(location_bar->GetParent(), - &location_bar_origin); - - return Show(browser, bounds, location_bar_origin, hash_params); -} - -void AppLauncher::Hide() { - info_bubble_->Close(); -} - -void AppLauncher::OpenURLFromTab(TabContents* source, - const GURL& url, const GURL& referrer, - WindowOpenDisposition disposition, - PageTransition::Type transition) { - // TODO(jcivelli): we should call Browser::OpenApplicationTab(), we would need - // to access the app for this URL. - // The user clicked an item in the app launcher contents. - AddTabWithURL(url, PageTransition::AUTO_BOOKMARK); - Hide(); -} - -void AppLauncher::AddNewContents(TabContents* source, - TabContents* new_contents, - WindowOpenDisposition disposition, - const gfx::Rect& initial_pos, - bool user_gesture) { -} - -void AppLauncher::UpdatePreferredSize(const gfx::Size& pref_size) { - if (pref_size.width() == 0 || pref_size.height() == 0) - return; - - previous_contents_pref_size_ = contents_pref_size_; - contents_pref_size_ = pref_size; - - if (!animate_) { - info_bubble_content_->ComputePreferredSize(pref_size); - info_bubble_->SizeToContents(); - return; - } - - int original_height = previous_contents_pref_size_.height(); - int new_height = contents_pref_size_.height(); - int new_duration; - if (animation_->is_animating()) { - // Modify the animation duration so that the current running animation does - // not appear janky. - new_duration = static_cast<int>(new_height / kAnimationSpeedPxPerMS); - } else { - // The animation is not running. - animation_->Reset(); // It may have already been run. - new_duration = static_cast<int>(abs(new_height - original_height) / - kAnimationSpeedPxPerMS); - } - animation_->SetSlideDuration(new_duration); - animation_->Show(); // No-op if already showing. -} - -void AppLauncher::AnimationProgressed(const Animation* animation) { - gfx::Size contents_size(contents_pref_size_.width(), - animation->CurrentValueBetween(previous_contents_pref_size_.height(), - contents_pref_size_.height())); - info_bubble_content_->ComputePreferredSize(contents_size); - info_bubble_->SizeToContents(); -} - -void AppLauncher::InfoBubbleClosing(InfoBubble* info_bubble, - bool closed_by_escape) { - // Delay deleting to be safe (we, and our tabcontents may be on the stack). - // Remove ourself as a delegate as on GTK the Widget destruction is - // asynchronous and will happen after the AppLauncher has been deleted (and it - // might notify us after we have been deleted). - info_bubble_content_->GetBubbleTabContents()->set_delegate(NULL); - MessageLoop::current()->PostTask(FROM_HERE, - new DeleteTask<AppLauncher>(this)); -} - -void AppLauncher::AddTabWithURL(const GURL& url, - PageTransition::Type transition) { - browser_->AddSelectedTabWithURL(url, transition); -} - -void AppLauncher::Resize(const gfx::Size& contents_size) { - info_bubble_content_->ComputePreferredSize(contents_size); - info_bubble_->SizeToContents(); -} diff --git a/chrome/browser/views/app_launcher.h b/chrome/browser/views/app_launcher.h deleted file mode 100644 index 2f99ec8..0000000 --- a/chrome/browser/views/app_launcher.h +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) 2010 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. - -#ifndef CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ -#define CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ -#pragma once - -#include <string> - -#include "app/slide_animation.h" -#include "base/scoped_ptr.h" -#include "base/task.h" -#include "chrome/browser/tab_contents/tab_contents_delegate.h" -#include "chrome/browser/views/pinned_contents_info_bubble.h" - -class Browser; -class InfoBubbleContentsView; - -// AppLauncher manages showing the application launcher and optionally the -// navigation bar in compact navigation bar mode. The app launcher is -// currently an HTML page. When the user clicks a link on the page a -// new tab is added to the current browser and the app launcher is hidden. -// When the user opens a new page from the navigation bar, it opens a -// new tab on left, on right or clobbers the current tab depending on -// the configuration. -// -// To show the app launcher invoke Show. -// -// When a new url is opened, or the user clicks outsides the bounds of the -// widget the app launcher is closed. -class AppLauncher : public AnimationDelegate, - public InfoBubbleDelegate, - public TabContentsDelegate { - public: - // Shows an application launcher bubble pointing to the |bounds| (which should - // be in screen coordinates). |bubble_anchor| specifies at which coordinates - // the bubble contents should appear (in screen coordinates). The bubble will - // be moved accordingly. Any |hash_params| are appended to the hash of the URL - // that is opened in the launcher. - // - // The caller DOES NOT OWN the AppLauncher returned. It is deleted - // automatically when the AppLauncher is closed. - static AppLauncher* Show(Browser* browser, - const gfx::Rect& bounds, - const gfx::Point& bubble_anchor, - const std::string& hash_params); - - // Shows an application launcher bubble pointing to the new tab button. - // Any |hash_params| are appended to the hash of the URL that is opened in - // the launcher. - // - // The caller DOES NOT OWN the AppLauncher returned. It is deleted - // automatically when the AppLauncher is closed. - static AppLauncher* ShowForNewTab(Browser* browser, - const std::string& hash_params); - - // Returns the browser this AppLauncher is associated with. - Browser* browser() const { return browser_; } - - // Returns any hash params for the page to open. - const std::string& hash_params() const { return hash_params_; } - - // Hides the app launcher. - void Hide(); - - // AnimationDelegate overrides: - virtual void AnimationProgressed(const Animation* animation); - - // InfoBubbleDelegate overrides. - virtual void InfoBubbleClosing(InfoBubble* info_bubble, - bool closed_by_escape); - virtual bool CloseOnEscape() { return true; } - virtual bool FadeInOnShow() { return false; } - - // TabContentsDelegate. - virtual void OpenURLFromTab(TabContents* source, - const GURL& url, const GURL& referrer, - WindowOpenDisposition disposition, - PageTransition::Type transition); - virtual void NavigationStateChanged(const TabContents* source, - unsigned changed_flags) {} - virtual void AddNewContents(TabContents* source, - TabContents* new_contents, - WindowOpenDisposition disposition, - const gfx::Rect& initial_pos, - bool user_gesture); - virtual void ActivateContents(TabContents* contents) {} - virtual void DeactivateContents(TabContents* contents) {} - virtual void LoadingStateChanged(TabContents* source) {} - virtual void CloseContents(TabContents* source) {} - virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} - virtual void URLStarredChanged(TabContents* source, bool starred) {} - virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} - virtual bool ShouldEnablePreferredSizeNotifications() { return true; } - virtual void UpdatePreferredSize(const gfx::Size& pref_size); - - private: - friend class DeleteTask<AppLauncher>; - friend class InfoBubbleContentsView; - - explicit AppLauncher(Browser* browser); - ~AppLauncher(); - - void AddTabWithURL(const GURL& url, PageTransition::Type transition); - - // Resizes the bubble so it matches its contents's size |contents_size|. - void Resize(const gfx::Size& contents_size); - - // The currently active browser. We use this to open urls. - Browser* browser_; - - // The InfoBubble displaying the Omnibox and app contents. - PinnedContentsInfoBubble* info_bubble_; - - // The view with the navigation bar and render view, shown in the info-bubble. - InfoBubbleContentsView* info_bubble_content_; - - // An optional string containing querystring-encoded name/value pairs to be - // sent into the launcher's HTML page via its hash. - std::string hash_params_; - - // The preferred size of the DOM contents. - gfx::Size contents_pref_size_; - - // The previous preferred size of the DOM contents. - gfx::Size previous_contents_pref_size_; - - // Whether we should use an animation when showing the info-bubble. - bool animate_; - - // The animation that grows the info-bubble. - scoped_ptr<SlideAnimation> animation_; - - DISALLOW_COPY_AND_ASSIGN(AppLauncher); -}; - -#endif // CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ diff --git a/chrome/browser/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/views/tabs/browser_tab_strip_controller.cc index 52d58a8..78b1aa1 100644 --- a/chrome/browser/views/tabs/browser_tab_strip_controller.cc +++ b/chrome/browser/views/tabs/browser_tab_strip_controller.cc @@ -13,7 +13,6 @@ #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_menu_model.h" #include "chrome/browser/tabs/tab_strip_model.h" -#include "chrome/browser/views/app_launcher.h" #include "chrome/browser/views/tabs/base_tab_strip.h" #include "chrome/browser/views/tabs/tab_renderer_data.h" #include "chrome/common/chrome_switches.h" @@ -272,9 +271,6 @@ void BrowserTabStripController::CreateNewTab() { UserMetrics::RecordAction(UserMetricsAction("NewTab_Button"), model_->profile()); - if (browser_ && browser_->OpenAppsPanelAsNewTab()) - return; - model_->delegate()->AddBlankTab(true); } diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 7d77275..f5d3f7d 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2919,8 +2919,6 @@ 'browser/views/accessible_view_helper.cc', 'browser/views/accessible_view_helper.h', 'browser/views/app_launched_animation_win.cc', - 'browser/views/app_launcher.cc', - 'browser/views/app_launcher.h', 'browser/views/appcache_info_view.cc', 'browser/views/appcache_info_view.h', 'browser/views/autocomplete/autocomplete_popup_contents_view.cc', @@ -3683,10 +3681,6 @@ ['include', '^browser/views/accessible_toolbar_view.h'], ['include', '^browser/views/accessible_view_helper.cc'], ['include', '^browser/views/accessible_view_helper.h'], - ['include', '^browser/views/app_launcher.cc'], - ['include', '^browser/views/app_launcher.cc'], - ['include', '^browser/views/app_launcher.h'], - ['include', '^browser/views/app_launcher.h'], ['include', '^browser/views/autocomplete/autocomplete_popup_contents_view.cc'], ['include', '^browser/views/autocomplete/autocomplete_popup_contents_view.h'], ['include', '^browser/views/autocomplete/autocomplete_popup_gtk.cc'], diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index d38d1b0..a60f712 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -51,9 +51,6 @@ const char kAppId[] = "app-id"; // panel window. const char kAppLaunchAsPanel[] = "app-launch-as-panel"; -// Makes the app launcher popup when a new tab is created. -const char kAppsPanel[] = "apps-panel"; - // The URL to use for the gallery link in the app launcher. const char kAppsGalleryURL[] = "apps-gallery-url"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index e5c6477..d4d1500 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -30,7 +30,6 @@ extern const char kApp[]; extern const char kAppId[]; extern const char kAppLaunchAsPanel[]; extern const char kAppsDebug[]; -extern const char kAppsPanel[]; extern const char kAppsGalleryURL[]; extern const char kAppsNoThrob[]; extern const char kAuthNegotiateDelegateWhitelist[]; |