diff options
author | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 07:16:51 +0000 |
---|---|---|
committer | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 07:16:51 +0000 |
commit | e41982a7fd5dfdc59803abdde459b0065ad57f30 (patch) | |
tree | 46d3b0ba8a2400a342692a2547e6a67d778ad9a2 /chrome/browser/automation | |
parent | 9599e96765be3adda8573939d7143dce771e37a4 (diff) | |
download | chromium_src-e41982a7fd5dfdc59803abdde459b0065ad57f30.zip chromium_src-e41982a7fd5dfdc59803abdde459b0065ad57f30.tar.gz chromium_src-e41982a7fd5dfdc59803abdde459b0065ad57f30.tar.bz2 |
Use search::Mode in InstantModel.
Major changes:
+ Use search::Mode in InstantModel, instead of a custom enum.
+ Better logic in Update(), SearchModeChanged(), ActiveTabChanged() and Show()
in InstantController, allowing us to delete some unnecessary code.
+ Make InstantController be always present in BrowserInstantController, thus
getting rid of ResetInstant() and related code and notifications.
+ Remove |mode_| from InstantController, opting for a pair of booleans instead,
which will pave the way for suggestions-only Instant (in the near future).
+ Move prefs related code from InstantController to BrowserInstantController.
+ Correctly avoid deleting InstantLoader::preview_delegate_ prematurely.
+ Refactor OmniboxLostFocus(), with code mostly borrowed from @samarth's
excellent work in http://codereview.chromium.org/10909109/.
+ Make Hide() private to InstantController. Yay!
+ Call ActiveTabChanged() from Browser, instead of from an independent observer
(BrowserInstantController), to enforce ordering requirements.
+ Added DVLOGs for easier development. My choice of commandline:
--vmodule=*instant*=1,*searchbox*=1
+ Refresh loader only when the omnibox is unfocused and the preview is hidden.
+ Remove a cocoa unittest that didn't seem to be testing anything worthwhile.
+ In Views code, make the ownership of the preview WebView clearer. I've been
unable to make it crash by closing the browser with the preview showing, so
I guess it works. If I missed something, please let me know.
Minor changes include inconsequential refactoring or renaming, making things
more private than public, updating copyright header in every file that was
touched, removing unnecessary includes, etc.
BUG=159012,161367,161270
R=sky@chromium.org
TEST=See bugs.
Review URL: https://chromiumcodereview.appspot.com/11417056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 14f61ca..98cf413 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -65,7 +65,6 @@ #include "chrome/browser/importer/importer_host.h" #include "chrome/browser/importer/importer_list.h" #include "chrome/browser/infobars/infobar_tab_helper.h" -#include "chrome/browser/instant/instant_controller.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/balloon_collection.h" @@ -3181,7 +3180,7 @@ void TestingAutomationProvider::GetInstantInfo(Browser* browser, DictionaryValue* args, IPC::Message* reply_message) { DictionaryValue* info = new DictionaryValue; - if (browser->instant_controller()->instant()) { + if (browser->instant_controller()) { InstantController* instant = browser->instant_controller()->instant(); info->SetBoolean("enabled", true); info->SetBoolean("active", (instant->GetPreviewContents() != NULL)); |