summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/search_engines
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 23:08:10 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 23:08:10 +0000
commit9b0e63e553262024ffa72deaa8a650ee93e17e7d (patch)
tree7087b906a4335c72c45dc1491a15e7505904e9f5 /chrome/browser/ui/search_engines
parentdac271e105147a82477735f261a0b224db1f4e30 (diff)
downloadchromium_src-9b0e63e553262024ffa72deaa8a650ee93e17e7d.zip
chromium_src-9b0e63e553262024ffa72deaa8a650ee93e17e7d.tar.gz
chromium_src-9b0e63e553262024ffa72deaa8a650ee93e17e7d.tar.bz2
Make views::Label and views::Link auto-color themselves to be readable over their background color. Unfortunately since they can't automatically determine what that backgruond color is it has to be manually set. (I suppose I could try to add some crazy hierarchy-walking code looking for views::Background objects, but that seems like a bad move.) There is also a disable switch, which I use in a few places where I couldn't figure out what the background color actually is, or where updating it is really annoying.
In theory, we might want to apply this to other controls like text buttons, but since those are usually rendered with explicit background images there's probably not a ton of win there. This also makes some other cleanup changes like converting a few wstrings to string16s, de-inlining some class member functions, etc. Some of these were mandated by the presubmitter :/ BUG=92 TEST=Things still look OK Review URL: http://codereview.chromium.org/8221027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/search_engines')
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h8
-rw-r--r--chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc8
-rw-r--r--chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h13
3 files changed, 12 insertions, 17 deletions
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h b/chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h
index 1c5ddcf..fe7278b 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h
@@ -9,7 +9,6 @@
class Profile;
class TabContents;
class TemplateURL;
-class TemplateURLService;
// Objects implement this interface to get notified about changes in the
// SearchEngineTabHelper and to provide necessary functionality.
@@ -17,10 +16,9 @@ class SearchEngineTabHelperDelegate {
public:
// Shows a confirmation dialog box for setting the default search engine
// described by |template_url|. Takes ownership of |template_url|.
- virtual void ConfirmSetDefaultSearchProvider(
- TabContents* tab_contents,
- TemplateURL* template_url,
- TemplateURLService* template_url_service) = 0;
+ virtual void ConfirmSetDefaultSearchProvider(TabContents* tab_contents,
+ TemplateURL* template_url,
+ Profile* profile) = 0;
// Shows a confirmation dialog box for adding a search engine described by
// |template_url|. Takes ownership of |template_url|.
diff --git a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
index 37e6edc..2a1db23 100644
--- a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
+++ b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.cc
@@ -28,15 +28,13 @@ TemplateURLFetcherUICallbacks::~TemplateURLFetcherUICallbacks() {
void TemplateURLFetcherUICallbacks::ConfirmSetDefaultSearchProvider(
TemplateURL* template_url,
- TemplateURLService* template_url_service) {
+ Profile* profile) {
scoped_ptr<TemplateURL> owned_template_url(template_url);
if (!source_ || !source_->delegate() || !tab_contents_)
return;
- source_->delegate()->ConfirmSetDefaultSearchProvider(
- tab_contents_,
- owned_template_url.release(),
- template_url_service);
+ source_->delegate()->ConfirmSetDefaultSearchProvider(tab_contents_,
+ owned_template_url.release(), profile);
}
void TemplateURLFetcherUICallbacks::ConfirmAddSearchProvider(
diff --git a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h
index 7c6a014..d0bf1bb 100644
--- a/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h
+++ b/chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "chrome/browser/search_engines/template_url_fetcher_callbacks.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
@@ -23,17 +24,15 @@ class TemplateURLFetcherUICallbacks : public TemplateURLFetcherCallbacks,
virtual ~TemplateURLFetcherUICallbacks();
// TemplateURLFetcherCallback implementation.
- virtual void ConfirmSetDefaultSearchProvider(
- TemplateURL* template_url,
- TemplateURLService* template_url_service);
- virtual void ConfirmAddSearchProvider(
- TemplateURL* template_url,
- Profile* profile);
+ virtual void ConfirmSetDefaultSearchProvider(TemplateURL* template_url,
+ Profile* profile) OVERRIDE;
+ virtual void ConfirmAddSearchProvider(TemplateURL* template_url,
+ Profile* profile) OVERRIDE;
// NotificationObserver:
virtual void Observe(int type,
const NotificationSource& source,
- const NotificationDetails& details);
+ const NotificationDetails& details) OVERRIDE;
private:
// The SearchEngineTabHelper where this request originated. Can be NULL if the