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

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

Issue 10034009: chrome/browser/chromeos/input_method/ refactoring [part 3 of 6]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/mock_candidate_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/mock_candidate_window.h
diff --git a/chrome/browser/chromeos/input_method/mock_candidate_window.h b/chrome/browser/chromeos/input_method/mock_candidate_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..754ad9211482e9c0e529bc1a63b92d0393f2dac3
--- /dev/null
+++ b/chrome/browser/chromeos/input_method/mock_candidate_window.h
@@ -0,0 +1,44 @@
+// Copyright (c) 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_CHROMEOS_INPUT_METHOD_MOCK_CANDIDATE_WINDOW_H_
+#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_CANDIDATE_WINDOW_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/observer_list.h"
+#include "chrome/browser/chromeos/input_method/candidate_window.h"
+
+namespace chromeos {
+namespace input_method {
+
+// The mock CandidateWindowController implementation for testing.
+class MockCandidateWindowController : public CandidateWindowController {
+ public:
+ MockCandidateWindowController();
+ virtual ~MockCandidateWindowController();
+
+ // CandidateWindowController overrides:
+ virtual bool Init() OVERRIDE;
+ virtual void AddObserver(Observer* observer) OVERRIDE;
+ virtual void RemoveObserver(Observer* observer) OVERRIDE;
+
+ // Notifies observers.
+ void NotifyCandidateWindowOpened();
+ void NotifyCandidateWindowClosed();
+
+ int init_count_;
+ int add_observer_count_;
+ int remove_observer_count_;
+
+ private:
+ ObserverList<CandidateWindowController::Observer> observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockCandidateWindowController);
+};
+
+} // namespace input_method
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_CANDIDATE_WINDOW_H_
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/mock_candidate_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698