Commit deadb057 authored by jered@chromium.org's avatar jered@chromium.org

InstantExtended: Nuke InstantOverlayController.

There is no longer an Instant overlay that needs controlling, so we can
remove InstantOverlayController. Mac's view code is warped around the
existence of an overlay, so cut out as much of the dead Instant code as
possible without removing OverlayableContentsController; I'm not a Cocoa
expert and don't know the best way to do that.

BUG=251262
TEST=None.
TBR=erg@chromium.org, rsesek@chromium.org, samarth@chromium.org

Review URL: https://codereview.chromium.org/22694002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217079 0039d316-1c4b-4281-b951-d872f2087c98
parent 87e3723f
......@@ -44,7 +44,6 @@ include_rules = [
"!chrome/browser/ui/browser_finder.h",
"!chrome/browser/search_engines/template_url_id.h",
"!chrome/browser/ui/profile_error_dialog.h",
"!chrome/browser/ui/search/instant_overlay.h",
"!chrome/browser/ui/webui/ntp/most_visited_handler.h",
"!chrome/browser/ui/webui/ntp/new_tab_ui.h",
]
......
......@@ -319,11 +319,6 @@ class WebContents;
// coordinates.
- (NSPoint)bookmarkBubblePoint;
// Returns the frame, in Cocoa (unflipped) screen coordinates, of the area where
// Instant results are. If Instant is not showing, returns the frame of where
// it would be.
- (NSRect)instantFrame;
// Called when the Add Search Engine dialog is closed.
- (void)sheetDidEnd:(NSWindow*)sheet
returnCode:(NSInteger)code
......
......@@ -1611,8 +1611,6 @@ enum {
[infoBarContainerController_ changeWebContents:contents];
[overlayableContentsController_ onActivateTabWithContents:contents];
[self updateAllowOverlappingViews:[self inPresentationMode]];
}
......@@ -1951,27 +1949,6 @@ willAnimateFromState:(BookmarkBar::State)oldState
return [[toolbarView superview] convertRect:anchorRect toView:nil];
}
- (NSRect)instantFrame {
// The view's bounds are in its own coordinate system. Convert that to the
// window base coordinate system, then translate it into the screen's
// coordinate system.
NSView* view = [overlayableContentsController_ view];
if (!view)
return NSZeroRect;
NSRect frame = [view convertRect:[view bounds] toView:nil];
NSPoint originInScreenCoords =
[[view window] convertBaseToScreen:frame.origin];
frame.origin = originInScreenCoords;
// Account for the bookmark bar height if it is currently in the detached
// state on the new tab page.
if ([bookmarkBarController_ isInState:BookmarkBar::DETACHED])
frame.size.height += NSHeight([[bookmarkBarController_ view] bounds]);
return frame;
}
- (void)sheetDidEnd:(NSWindow*)sheet
returnCode:(NSInteger)code
context:(void*)context {
......
......@@ -9,40 +9,23 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/common/instant_types.h"
class Browser;
class InstantOverlayControllerMac;
namespace content {
class WebContents;
}
// OverlayableContentsController manages the display of up to two tab contents
// views. It is primarily for use with Instant results. This class supports the
// notion of an "active" view vs. an "overlay" tab contents view.
// OverlayableContentsController is an obsolete wrapper holding the view where a
// tab's WebContents is displayed. In the old Chrome Instant implementation it
// multiplexed between the tab's contents and an overlay's contents. Now there
// is no overlay, but ripping this class out entirely is hard.
//
// The "active" view is a container view that can be retrieved using
// |-activeContainer|. Its contents are meant to be managed by an external
// class.
//
// The "overlay" can be set using |-showOverlay:| and |-hideOverlay|. When an
// overlay is set, the active view is hidden (but stays in the view hierarchy).
// When the overlay is removed, the active view is reshown.
// TODO(sail): Remove this class and replace it with something saner.
@interface OverlayableContentsController : NSViewController {
@private
// Container view for the "active" contents.
base::scoped_nsobject<NSView> activeContainer_;
// The overlay WebContents. Will be NULL if no overlay is currently showing.
content::WebContents* overlayContents_; // weak
// C++ bridge to the Instant model change interface.
scoped_ptr<InstantOverlayControllerMac> instantOverlayController_;
// The desired height of the overlay and units.
CGFloat overlayHeight_;
InstantSizeUnits overlayHeightUnits_;
}
@property(readonly, nonatomic) NSView* activeContainer;
......@@ -50,22 +33,6 @@ class WebContents;
// Initialization.
- (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
// current overlay and shows the active view.
- (void)setOverlay:(content::WebContents*)overlay
height:(CGFloat)height
heightUnits:(InstantSizeUnits)heightUnits
drawDropShadow:(BOOL)drawDropShadow;
// Called when a tab with |contents| is activated, so that we can check to see
// if it's the overlay being activated (and adjust internal state accordingly).
- (void)onActivateTabWithContents:(content::WebContents*)contents;
- (InstantOverlayControllerMac*)instantOverlayController;
- (BOOL)isShowingOverlay;
@end
#endif // CHROME_BROWSER_UI_COCOA_TAB_CONTENTS_OVERLAYABLE_CONTENTS_CONTROLLER_H_
......@@ -4,16 +4,9 @@
#import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
#include "chrome/browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@interface OverlayableContentsController()
- (void)viewDidResize:(NSNotification*)note;
- (void)layoutViews;
- (CGFloat)overlayHeightInPixels;
@end
@implementation OverlayableContentsController
- (id)initWithBrowser:(Browser*)browser {
......@@ -21,111 +14,18 @@
base::scoped_nsobject<NSView> view(
[[NSView alloc] initWithFrame:NSZeroRect]);
[view setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(viewDidResize:)
name:NSViewFrameDidChangeNotification
object:view];
[self setView:view];
activeContainer_.reset([[NSView alloc] initWithFrame:NSZeroRect]);
[activeContainer_ setAutoresizingMask:NSViewHeightSizable |
NSViewWidthSizable];
[view addSubview:activeContainer_];
instantOverlayController_.reset(
new InstantOverlayControllerMac(browser, self));
}
return self;
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
- (void)setOverlay:(content::WebContents*)overlay
height:(CGFloat)height
heightUnits:(InstantSizeUnits)heightUnits
drawDropShadow:(BOOL)drawDropShadow {
if (overlayContents_ == overlay &&
overlayHeight_ == height &&
overlayHeightUnits_ == heightUnits) {
return;
}
// Remove any old overlay contents before showing the new one.
if (overlayContents_) {
if (overlayContents_ != overlay)
overlayContents_->WasHidden();
[overlayContents_->GetView()->GetNativeView() removeFromSuperview];
}
overlayContents_ = overlay;
overlayHeight_ = height;
overlayHeightUnits_ = heightUnits;
// Add the overlay contents.
if (overlayContents_) {
[[[self view] window] disableScreenUpdatesUntilFlush];
[[self view] addSubview:overlayContents_->GetView()->GetNativeView()];
}
[self layoutViews];
if (overlayContents_)
overlayContents_->WasShown();
}
- (void)onActivateTabWithContents:(content::WebContents*)contents {
if (overlayContents_ == contents) {
if (overlayContents_) {
[overlayContents_->GetView()->GetNativeView() removeFromSuperview];
overlayContents_ = NULL;
}
[self setOverlay:NULL
height:0
heightUnits:INSTANT_SIZE_PIXELS
drawDropShadow:NO];
}
}
- (InstantOverlayControllerMac*)instantOverlayController {
return instantOverlayController_.get();
}
- (BOOL)isShowingOverlay {
return overlayContents_ != nil;
}
- (NSView*)activeContainer {
return activeContainer_.get();
}
- (void)viewDidResize:(NSNotification*)note {
[self layoutViews];
}
- (void)layoutViews {
if (!overlayContents_)
return;
// Layout the overlay.
NSRect bounds = [[self view] bounds];
NSRect overlayFrame = bounds;
overlayFrame.size.height = [self overlayHeightInPixels];
overlayFrame.origin.y = NSMaxY(bounds) - NSHeight(overlayFrame);
[overlayContents_->GetView()->GetNativeView() setFrame:overlayFrame];
}
- (CGFloat)overlayHeightInPixels {
CGFloat height = NSHeight([[self view] bounds]);
switch (overlayHeightUnits_) {
case INSTANT_SIZE_PERCENT:
return std::min(height, (height * overlayHeight_) / 100);
case INSTANT_SIZE_PIXELS:
return std::min(height, overlayHeight_);
}
}
@end
// Copyright 2012 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.
#import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.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"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#import "testing/gtest_mac.h"
class OverlayableContentsControllerTest : public InProcessBrowserTest,
public content::NotificationObserver {
public:
OverlayableContentsControllerTest() : instant_overlay_model_(NULL),
visibility_changed_count_(0) {
}
virtual void SetUpOnMainThread() OVERRIDE {
web_contents_.reset(content::WebContents::Create(
content::WebContents::CreateParams(browser()->profile())));
instant_overlay_model_.SetOverlayContents(web_contents_.get());
controller_.reset([[OverlayableContentsController alloc]
initWithBrowser:browser()]);
[[controller_ view] setFrame:NSMakeRect(0, 0, 100, 200)];
instant_overlay_model_.AddObserver([controller_ instantOverlayController]);
}
virtual void CleanUpOnMainThread() OVERRIDE {
instant_overlay_model_.RemoveObserver(
[controller_ instantOverlayController]);
instant_overlay_model_.SetOverlayContents(NULL);
controller_.reset();
web_contents_.reset();
}
void VerifyOverlayFrame(CGFloat expected_height,
InstantSizeUnits units) {
NSRect container_bounds = [[controller_ view] bounds];
NSRect overlay_frame =
[web_contents_->GetView()->GetNativeView() frame];
EXPECT_EQ(NSMinX(container_bounds), NSMinX(overlay_frame));
EXPECT_EQ(NSWidth(container_bounds), NSWidth(overlay_frame));
switch (units) {
case INSTANT_SIZE_PIXELS:
EXPECT_EQ(expected_height, NSHeight(overlay_frame));
EXPECT_EQ(NSMaxY(container_bounds), NSMaxY(overlay_frame));
break;
case INSTANT_SIZE_PERCENT:
EXPECT_EQ((expected_height * NSHeight(container_bounds)) / 100,
NSHeight(overlay_frame));
EXPECT_EQ(NSMaxY(container_bounds), NSMaxY(overlay_frame));
}
}
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
if (type == content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED)
++visibility_changed_count_;
}
protected:
InstantOverlayModel instant_overlay_model_;
scoped_ptr<content::WebContents> web_contents_;
base::scoped_nsobject<OverlayableContentsController> controller_;
content::NotificationRegistrar registrar_;
int visibility_changed_count_;
};
// Verify that the view is correctly laid out when size is specified in percent.
IN_PROC_BROWSER_TEST_F(OverlayableContentsControllerTest, SizePerecent) {
SearchMode mode;
mode.mode = SearchMode::MODE_NTP;
CGFloat expected_height = 30;
InstantSizeUnits units = INSTANT_SIZE_PERCENT;
instant_overlay_model_.SetOverlayState(mode, expected_height, units);
EXPECT_NSEQ([web_contents_->GetView()->GetNativeView() superview],
[controller_ view]);
VerifyOverlayFrame(expected_height, units);
// Resize the view and verify that the overlay is also resized.
[[controller_ view] setFrameSize:NSMakeSize(300, 400)];
VerifyOverlayFrame(expected_height, units);
}
// Verify that the view is correctly laid out when size is specified in pixels.
IN_PROC_BROWSER_TEST_F(OverlayableContentsControllerTest, SizePixels) {
SearchMode mode;
mode.mode = SearchMode::MODE_NTP;
CGFloat expected_height = 30;
InstantSizeUnits units = INSTANT_SIZE_PIXELS;
instant_overlay_model_.SetOverlayState(mode, expected_height, units);
EXPECT_NSEQ([web_contents_->GetView()->GetNativeView() superview],
[controller_ view]);
VerifyOverlayFrame(expected_height, units);
// Resize the view and verify that the overlay is also resized.
[[controller_ view] setFrameSize:NSMakeSize(300, 400)];
VerifyOverlayFrame(expected_height, units);
}
// Verify that the web contents is not hidden when just the height changes.
IN_PROC_BROWSER_TEST_F(OverlayableContentsControllerTest, HeightChangeNoHide) {
SearchMode mode;
mode.mode = SearchMode::MODE_SEARCH_SUGGESTIONS;
instant_overlay_model_.SetOverlayState(mode, 10, INSTANT_SIZE_PERCENT);
registrar_.Add(this,
content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
content::Source<content::WebContents>(web_contents_.get()));
EXPECT_EQ(0, visibility_changed_count_);
instant_overlay_model_.SetOverlayState(mode, 11, INSTANT_SIZE_PERCENT);
EXPECT_EQ(1, visibility_changed_count_);
}
......@@ -64,7 +64,6 @@
#include "chrome/browser/ui/gtk/gtk_window_util.h"
#include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h"
#include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
#include "chrome/browser/ui/gtk/instant_overlay_controller_gtk.h"
#include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
#include "chrome/browser/ui/gtk/nine_box.h"
#include "chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h"
......@@ -1686,9 +1685,6 @@ void BrowserWindowGtk::InitWidgets() {
gtk_box_pack_end(GTK_BOX(window_vbox_), render_area_event_box_,
TRUE, TRUE, 0);
instant_overlay_controller_.reset(
new InstantOverlayControllerGtk(this, contents_container_.get()));
if (IsBookmarkBarSupported()) {
bookmark_bar_.reset(new BookmarkBarGtk(this,
browser_.get(),
......
......@@ -512,9 +512,6 @@ class BrowserWindowGtk
// selected tab contents.
scoped_ptr<TabContentsContainerGtk> devtools_container_;
// A sub-controller that manages the Instant overlay visual state.
scoped_ptr<InstantOverlayControllerGtk> instant_overlay_controller_;
// The Extension Keybinding Registry responsible for registering listeners for
// accelerators that are sent to the window, that are destined to be turned
// into events and sent to the extension.
......
// Copyright 2012 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/ui/gtk/instant_overlay_controller_gtk.h"
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
#include "chrome/browser/ui/gtk/tab_contents_container_gtk.h"
#include "chrome/browser/ui/search/instant_overlay_model.h"
InstantOverlayControllerGtk::InstantOverlayControllerGtk(
BrowserWindowGtk* window,
TabContentsContainerGtk* contents)
: InstantOverlayController(window->browser()),
window_(window),
contents_(contents) {
}
InstantOverlayControllerGtk::~InstantOverlayControllerGtk() {
}
void InstantOverlayControllerGtk::OverlayStateChanged(
const InstantOverlayModel& model) {
if (model.mode().is_search_suggestions()) {
// TODO(jered): Support non-100% height.
contents_->SetOverlay(model.GetOverlayContents());
} else {
contents_->SetOverlay(NULL);
}
window_->MaybeShowBookmarkBar(false);
}
// Copyright 2012 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_UI_GTK_INSTANT_OVERLAY_CONTROLLER_GTK_H_
#define CHROME_BROWSER_UI_GTK_INSTANT_OVERLAY_CONTROLLER_GTK_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/ui/search/instant_overlay_controller.h"
class BrowserWindowGtk;
class TabContentsContainerGtk;
class InstantOverlayControllerGtk : public InstantOverlayController {
public:
InstantOverlayControllerGtk(BrowserWindowGtk* window,
TabContentsContainerGtk* contents);
virtual ~InstantOverlayControllerGtk();
private:
// Overridden from InstantOverlayController:
virtual void OverlayStateChanged(const InstantOverlayModel& model) OVERRIDE;
BrowserWindowGtk* const window_;
TabContentsContainerGtk* const contents_;
DISALLOW_COPY_AND_ASSIGN(InstantOverlayControllerGtk);
};
#endif // CHROME_BROWSER_UI_GTK_INSTANT_OVERLAY_CONTROLLER_GTK_H_
// Copyright 2012 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/ui/search/instant_overlay_controller.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_instant_controller.h"
InstantOverlayController::InstantOverlayController(Browser* browser)
: browser_(browser) {
}
InstantOverlayController::~InstantOverlayController() {
}
// Copyright 2012 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_UI_SEARCH_INSTANT_OVERLAY_CONTROLLER_H_
#define CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_CONTROLLER_H_
#include "base/compiler_specific.h"
#include "chrome/browser/ui/search/instant_overlay_model_observer.h"
class Browser;
class InstantOverlayModel;
// Abstract base class for platform-specific Instant overlay controllers.
class InstantOverlayController : public InstantOverlayModelObserver {
protected:
explicit InstantOverlayController(Browser* browser);
virtual ~InstantOverlayController();
Browser* const browser_;
private:
// Overridden from InstantOverlayModelObserver:
virtual void OverlayStateChanged(
const InstantOverlayModel& model) OVERRIDE = 0;
};
#endif // CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_CONTROLLER_H_
// Copyright 2012 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/ui/search/instant_overlay_model.h"
#include "chrome/browser/ui/search/instant_controller.h"
#include "chrome/browser/ui/search/instant_overlay_model_observer.h"
InstantOverlayModel::InstantOverlayModel(InstantController* controller)
: height_(0),
height_units_(INSTANT_SIZE_PIXELS),
overlay_contents_(NULL),
controller_(controller) {
}
InstantOverlayModel::~InstantOverlayModel() {
}
void InstantOverlayModel::SetOverlayState(const SearchMode& mode,
int height,
InstantSizeUnits height_units) {
if (mode_.mode == mode.mode && height_ == height &&
height_units_ == height_units) {
// Mode::mode hasn't changed, but perhaps bits that we ignore (such as
// Mode::origin) have. Update |mode_| anyway, so it's consistent with the
// argument (so mode() doesn't return something unexpected).
mode_ = mode;
return;
}
DVLOG(1) << "SetOverlayState: " << mode_.mode << " to " << mode.mode;
mode_ = mode;
height_ = height;
height_units_ = height_units;
FOR_EACH_OBSERVER(InstantOverlayModelObserver, observers_,
OverlayStateChanged(*this));
}
void InstantOverlayModel::SetOverlayContents(
content::WebContents* overlay_contents) {
if (overlay_contents_ == overlay_contents)
return;
overlay_contents_ = overlay_contents;
FOR_EACH_OBSERVER(InstantOverlayModelObserver, observers_,
OverlayStateChanged(*this));
}
content::WebContents* InstantOverlayModel::GetOverlayContents() const {
return overlay_contents_;
}
void InstantOverlayModel::AddObserver(InstantOverlayModelObserver* observer) {
observers_.AddObserver(observer);
}
void InstantOverlayModel::RemoveObserver(
InstantOverlayModelObserver* observer) {
observers_.RemoveObserver(observer);
}
// Copyright 2012 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_UI_SEARCH_INSTANT_OVERLAY_MODEL_H_
#define CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_MODEL_H_
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "chrome/common/instant_types.h"
#include "chrome/common/search_types.h"
class InstantController;
class InstantOverlayModelObserver;
namespace content {
class WebContents;
}
// Holds state that is important to any views concerned with visibility and
// layout of the Instant overlay.
class InstantOverlayModel {
public:
explicit InstantOverlayModel(InstantController* controller);
~InstantOverlayModel();
// InstantOverlayModel only uses Mode::mode internally. Other parts of Mode,
// such as Mode::origin, may have arbitrary values, and should be ignored.
const SearchMode& mode() const { return mode_; }
int height() const { return height_; }
InstantSizeUnits height_units() const { return height_units_; }
void SetOverlayState(const SearchMode& mode,
int height,
InstantSizeUnits height_units);
void SetOverlayContents(content::WebContents* overlay_contents);
content::WebContents* GetOverlayContents() const;
// Add and remove observers.
void AddObserver(InstantOverlayModelObserver* observer);
void RemoveObserver(InstantOverlayModelObserver* observer);
private:
SearchMode mode_;
int height_;
InstantSizeUnits height_units_;
// Weak. Remembers the last set overlay contents to detect changes. Actual
// overlay contents is fetched from the |controller_| as this may not always
// reflect the actual overlay in effect.
content::WebContents* overlay_contents_;
// Weak. The controller currently holds some model state.
// TODO(dhollowa): Remove this, transfer all state to InstantOverlayModel.
InstantController* const controller_;
// Observers.
ObserverList<InstantOverlayModelObserver> observers_;
DISALLOW_COPY_AND_ASSIGN(InstantOverlayModel);
};
#endif // CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_MODEL_H_
// Copyright 2012 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_UI_SEARCH_INSTANT_OVERLAY_MODEL_OBSERVER_H_
#define CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_MODEL_OBSERVER_H_
class InstantOverlayModel;
// This class defines the observer interface for the InstantOverlayModel.
class InstantOverlayModelObserver {
public:
// Informs the observer that the overlay state has changed. This can mean
// either the model state changed or the contents of the overlay changed.
virtual void OverlayStateChanged(const InstantOverlayModel& model) = 0;
protected:
~InstantOverlayModelObserver() {}
};
#endif // CHROME_BROWSER_UI_SEARCH_INSTANT_OVERLAY_MODEL_OBSERVER_H_
......@@ -873,8 +873,6 @@
'browser/ui/cocoa/tab_contents/chrome_web_contents_view_delegate_mac.mm',
'browser/ui/cocoa/tab_contents/favicon_util_mac.h',
'browser/ui/cocoa/tab_contents/favicon_util_mac.mm',
'browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.h',
'browser/ui/cocoa/tab_contents/instant_overlay_controller_mac.mm',
'browser/ui/cocoa/tab_contents/overlayable_contents_controller.h',
'browser/ui/cocoa/tab_contents/overlayable_contents_controller.mm',
'browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h',
......@@ -1175,8 +1173,6 @@
'browser/ui/gtk/infobars/translate_infobar_base_gtk.h',
'browser/ui/gtk/infobars/translate_message_infobar_gtk.cc',
'browser/ui/gtk/infobars/translate_message_infobar_gtk.h',
'browser/ui/gtk/instant_overlay_controller_gtk.cc',
'browser/ui/gtk/instant_overlay_controller_gtk.h',
'browser/ui/gtk/javascript_app_modal_dialog_gtk.cc',
'browser/ui/gtk/javascript_app_modal_dialog_gtk.h',
'browser/ui/gtk/location_bar_view_gtk.cc',
......@@ -1387,11 +1383,6 @@
'browser/ui/search/instant_ntp.h',
'browser/ui/search/instant_ntp_prerenderer.cc',
'browser/ui/search/instant_ntp_prerenderer.h',
'browser/ui/search/instant_overlay_controller.cc',
'browser/ui/search/instant_overlay_controller.h',
'browser/ui/search/instant_overlay_model.cc',
'browser/ui/search/instant_overlay_model.h',
'browser/ui/search/instant_overlay_model_observer.h',
'browser/ui/search/instant_page.cc',
'browser/ui/search/instant_page.h',
'browser/ui/search/instant_tab.cc',
......
......@@ -1579,7 +1579,6 @@
'browser/ui/cocoa/one_click_signin_dialog_controller_browsertest.mm',
'browser/ui/cocoa/profile_signin_confirmation_view_controller_browsertest.mm',
'browser/ui/cocoa/ssl_client_certificate_selector_cocoa_browsertest.mm',
'browser/ui/cocoa/tab_contents/overlayable_contents_controller_browsertest.mm',
'browser/ui/cocoa/view_id_util_browsertest.mm',
'browser/ui/find_bar/find_bar_host_browsertest.cc',
'browser/ui/fullscreen/fullscreen_controller_browsertest.cc',
......
......@@ -112,15 +112,6 @@ struct InstantAutocompleteResult {
typedef std::pair<InstantRestrictedID, InstantAutocompleteResult>
InstantAutocompleteResultIDPair;
// How to interpret the size (height or width) of the Instant overlay (preview).
enum InstantSizeUnits {
// As an absolute number of pixels.
INSTANT_SIZE_PIXELS,
// As a percentage of the height or width of the containing (parent) view.
INSTANT_SIZE_PERCENT,
};
// The alignment of the theme background image.
enum ThemeBackgroundImageAlignment {
THEME_BKGRND_IMAGE_ALIGN_CENTER,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment