diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-01 22:01:07 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-01 22:01:07 +0000 |
commit | 24c66d99fd134119cce6d88b59bf444a20faa911 (patch) | |
tree | e11761be7348fae0f51362151d6f1e457aa00f02 | |
parent | ee76278a3289dc784563ea6e8209247c6d1b6b9c (diff) | |
download | chromium_src-24c66d99fd134119cce6d88b59bf444a20faa911.zip chromium_src-24c66d99fd134119cce6d88b59bf444a20faa911.tar.gz chromium_src-24c66d99fd134119cce6d88b59bf444a20faa911.tar.bz2 |
Instant Extended: Delete unused html popup code
This is some additional code to hide the bookmark bar when the HTML
popup is displayed. It can safely be deleted since we no longer use
the HTML popup anymore.
BUG=254670
Review URL: https://chromiumcodereview.appspot.com/18323007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209514 0039d316-1c4b-4281-b951-d872f2087c98
6 files changed, 5 insertions, 46 deletions
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index e3c9a81..73eba37 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -344,8 +344,7 @@ enum { // Create the overlayable contents controller. This provides the switch // view that TabStripController needs. overlayableContentsController_.reset( - [[OverlayableContentsController alloc] initWithBrowser:browser - windowController:self]); + [[OverlayableContentsController alloc] initWithBrowser:browser]); [[overlayableContentsController_ view] setFrame:[[devToolsController_ view] bounds]]; [[devToolsController_ view] diff --git a/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h b/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h index 2da31f7..836e225 100644 --- a/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h +++ b/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h @@ -10,13 +10,11 @@ #include "chrome/browser/ui/search/instant_overlay_controller.h" class Browser; -@class BrowserWindowController; @class OverlayableContentsController; class InstantOverlayControllerMac : public InstantOverlayController { public: InstantOverlayControllerMac(Browser* browser, - BrowserWindowController* window, OverlayableContentsController* overlay); virtual ~InstantOverlayControllerMac(); @@ -24,7 +22,6 @@ class InstantOverlayControllerMac : public InstantOverlayController { // Overridden from InstantOverlayController: virtual void OverlayStateChanged(const InstantOverlayModel& model) OVERRIDE; - BrowserWindowController* const window_; OverlayableContentsController* const overlay_; DISALLOW_COPY_AND_ASSIGN(InstantOverlayControllerMac); diff --git a/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm b/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm index f93c671..3510721 100644 --- a/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm +++ b/chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm @@ -4,22 +4,13 @@ #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h" -#include "chrome/browser/search/search.h" -#include "chrome/browser/ui/browser.h" -#import "chrome/browser/ui/cocoa/browser_window_controller.h" -#include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h" #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" #include "chrome/browser/ui/search/instant_overlay_model.h" -#include "chrome/browser/ui/search/search_model.h" -#include "chrome/browser/ui/search/search_tab_helper.h" -#include "chrome/browser/ui/tabs/tab_strip_model.h" InstantOverlayControllerMac::InstantOverlayControllerMac( Browser* browser, - BrowserWindowController* window, OverlayableContentsController* overlay) : InstantOverlayController(browser), - window_(window), overlay_(overlay) { } @@ -28,8 +19,6 @@ InstantOverlayControllerMac::~InstantOverlayControllerMac() { void InstantOverlayControllerMac::OverlayStateChanged( const InstantOverlayModel& model) { - bool set_top_bars_visibility = chrome::IsInstantExtendedAPIEnabled(); - if (model.mode().is_ntp() || model.mode().is_search_suggestions()) { // Drop shadow is only needed if search mode is not |NTP| and overlay does // not fill up the entire contents page. @@ -45,23 +34,5 @@ void InstantOverlayControllerMac::OverlayStateChanged( height:0 heightUnits:INSTANT_SIZE_PIXELS drawDropShadow:NO]; - } else { - set_top_bars_visibility = false; - } - - if (set_top_bars_visibility) { - // Set top bars (bookmark and info bars) visibility for current tab via - // |SearchTabHelper| of current active web contents: top bars are hidden if - // there's overlay. - content::WebContents* active_web_contents = - browser_->tab_strip_model()->GetActiveWebContents(); - if (active_web_contents) { - SearchTabHelper* search_tab_helper = - SearchTabHelper::FromWebContents(active_web_contents); - if (search_tab_helper) { - search_tab_helper->model()->SetTopBarsVisible( - ![overlay_ isShowingOverlay]); - } - } } } diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h index 8cfee1f..6033cba6 100644 --- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h +++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h @@ -12,7 +12,6 @@ #include "chrome/common/instant_types.h" class Browser; -@class BrowserWindowController; class InstantOverlayControllerMac; namespace content { @@ -49,8 +48,7 @@ class WebContents; @property(readonly, nonatomic) NSView* activeContainer; // Initialization. -- (id)initWithBrowser:(Browser*)browser - windowController:(BrowserWindowController*)windowController; +- (id)initWithBrowser:(Browser*)browser; // Sets the current overlay and installs its WebContentsView into the view // hierarchy. Hides the active view. If |overlay| is NULL then closes the diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm index 89f5b0dd..0b19677 100644 --- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm +++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm @@ -16,8 +16,7 @@ @implementation OverlayableContentsController -- (id)initWithBrowser:(Browser*)browser - windowController:(BrowserWindowController*)windowController { +- (id)initWithBrowser:(Browser*)browser { if ((self = [super init])) { base::scoped_nsobject<NSView> view( [[NSView alloc] initWithFrame:NSZeroRect]); @@ -35,7 +34,7 @@ [view addSubview:activeContainer_]; instantOverlayController_.reset( - new InstantOverlayControllerMac(browser, windowController, self)); + new InstantOverlayControllerMac(browser, self)); } return self; } diff --git a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm index 5f3a605..075b981 100644 --- a/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm +++ b/chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm @@ -7,7 +7,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" -#include "chrome/browser/ui/cocoa/browser_window_controller.h" #include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h" #include "chrome/browser/ui/search/instant_overlay_model.h" #include "chrome/test/base/in_process_browser_test.h" @@ -28,12 +27,8 @@ class OverlayableContentsControllerTest : public InProcessBrowserTest, content::WebContents::CreateParams(browser()->profile()))); instant_overlay_model_.SetOverlayContents(web_contents_.get()); - BrowserWindowController* window_controller = - [BrowserWindowController browserWindowControllerForWindow: - browser()->window()->GetNativeWindow()]; controller_.reset([[OverlayableContentsController alloc] - initWithBrowser:browser() - windowController:window_controller]); + initWithBrowser:browser()]); [[controller_ view] setFrame:NSMakeRect(0, 0, 100, 200)]; instant_overlay_model_.AddObserver([controller_ instantOverlayController]); } |