summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/spelling_bubble_model.h
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 11:23:35 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 11:23:35 +0000
commitf2a4351bb986766e774341b411516306d3e96b2b (patch)
tree1eba2451530187903eb6f97404319bfecfca80ba /chrome/browser/tab_contents/spelling_bubble_model.h
parent6bfad0e644a71f527292ea245f0582d073831de3 (diff)
downloadchromium_src-f2a4351bb986766e774341b411516306d3e96b2b.zip
chromium_src-f2a4351bb986766e774341b411516306d3e96b2b.tar.gz
chromium_src-f2a4351bb986766e774341b411516306d3e96b2b.tar.bz2
Adds a bubble that asks a user whether to integrate the Spelling service.
This change implements the final UI that integrates the Spelling service into Chrome on Windows to measure actual QPS to the spelling service with Windows Chrome. This UI updatee consists of three parts: * Add a context-menu item "Ask Google for spelling suggestions"; * Show a bubble when a user chosses the item, and; * Hide the suggestions from the Spelling service if it is in the suggestion list of the local spellchecker. BUG=93746 TEST=manual Review URL: http://codereview.chromium.org/8422006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/spelling_bubble_model.h')
-rw-r--r--chrome/browser/tab_contents/spelling_bubble_model.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/spelling_bubble_model.h b/chrome/browser/tab_contents/spelling_bubble_model.h
new file mode 100644
index 0000000..dd0cf58
--- /dev/null
+++ b/chrome/browser/tab_contents/spelling_bubble_model.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 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_TAB_CONTENTS_SPELLING_BUBBLE_MODEL_H_
+#define CHROME_BROWSER_TAB_CONTENTS_SPELLING_BUBBLE_MODEL_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "base/string16.h"
+#include "chrome/browser/ui/confirm_bubble_model.h"
+
+class Profile;
+
+// A class that implements a bubble menu shown when we confirm a user allows
+// integrating the spelling service of Google to Chrome.
+class SpellingBubbleModel : public ConfirmBubbleModel {
+ public:
+ explicit SpellingBubbleModel(Profile* profile);
+ virtual ~SpellingBubbleModel();
+
+ // ConfirmBubbleModel implementation.
+ virtual string16 GetTitle() const OVERRIDE;
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual gfx::Image* GetIcon() const OVERRIDE;
+ virtual string16 GetButtonLabel(BubbleButton button) const OVERRIDE;
+ virtual void Accept() OVERRIDE;
+ virtual void Cancel() OVERRIDE;
+
+ private:
+ Profile* profile_;
+};
+
+#endif // CHROME_BROWSER_TAB_CONTENTS_SPELLING_BUBBLE_MODEL_H_