Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Unified Diff: chrome/browser/chromeos/input_method/mode_indicator_controller.h

Issue 25670002: Create ModeIndicatorController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaked based on the review comments. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/mode_indicator_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/mode_indicator_controller.h
diff --git a/chrome/browser/chromeos/input_method/mode_indicator_controller.h b/chrome/browser/chromeos/input_method/mode_indicator_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c02230428bac26834a3e3a0cc003f2bb48bb7e8
--- /dev/null
+++ b/chrome/browser/chromeos/input_method/mode_indicator_controller.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2013 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_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_
+#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "chromeos/ime/input_method_manager.h"
+
+namespace gfx {
+class Rect;
+} // namespace gfx
+
+namespace chromeos {
+namespace input_method {
+
+class ModeIndicatorWidget;
+
+// ModeIndicatorController is the controller of ModeIndicatiorWidget on the
+// MVC model.
+class ModeIndicatorController
+ : public InputMethodManager::Observer {
+ public:
+ // This class takes the ownership of |mi_widget|.
+ explicit ModeIndicatorController(ModeIndicatorWidget *mi_widget);
+ virtual ~ModeIndicatorController();
+
+ // Set cursor location, which is the base point to display this indicator.
+ // Bacisally this indicator is displayed underneath the cursor.
+ void SetCursorLocation(const gfx::Rect& cursor_location);
+
+ private:
+ // InputMethodManager::Observer implementation.
+ virtual void InputMethodChanged(InputMethodManager* manager,
+ bool show_message) OVERRIDE;
+ virtual void InputMethodPropertyChanged(InputMethodManager* manager) OVERRIDE;
+
+ scoped_ptr<ModeIndicatorWidget> mi_widget_;
+
+ DISALLOW_COPY_AND_ASSIGN(ModeIndicatorController);
+};
+
+} // namespace input_method
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_CONTROLLER_H_
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/mode_indicator_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698