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

Unified Diff: chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h

Issue 12315069: Mac: Update zoom bubble UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 7 years, 10 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
Index: chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h
diff --git a/chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h b/chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3347f4d16b16955e7eb7e4fe41f174fefd239be
--- /dev/null
+++ b/chrome/browser/ui/cocoa/location_bar/mock_toolbar_model.h
@@ -0,0 +1,44 @@
+// Copyright 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_UI_COCOA_LOCATION_BAR_MOCK_TOOLBAR_MODEL_H_
+#define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_MOCK_TOOLBAR_MODEL_H_
+
+#include "chrome/browser/ui/toolbar/toolbar_model.h"
+#include "base/compiler_specific.h"
+
+namespace chrome {
+namespace testing {
+
+// Override the toolbar model to allow |GetInputInProgress| and
+// |WouldReplaceSearchURLWithSearchTerms| to be customized.
+class MockToolbarModel : public ToolbarModel {
+ public:
+ MockToolbarModel();
+ virtual ~MockToolbarModel();
+
+ virtual string16 GetText(
+ bool display_search_urls_as_search_terms) const OVERRIDE;
+ virtual GURL GetURL() const OVERRIDE;
+ virtual bool WouldReplaceSearchURLWithSearchTerms() const OVERRIDE;
+ virtual SecurityLevel GetSecurityLevel() const OVERRIDE;
+ virtual int GetIcon() const OVERRIDE;
+ virtual string16 GetEVCertName() const OVERRIDE;
+ virtual bool ShouldDisplayURL() const OVERRIDE;
+ virtual void SetInputInProgress(bool value) OVERRIDE;
+ virtual bool GetInputInProgress() const OVERRIDE;
+
+ void set_would_replace_search_url_with_search_terms(bool value) {
+ would_replace_search_url_with_search_terms_ = value;
+ }
+
+ private:
+ bool input_in_progress_;
+ bool would_replace_search_url_with_search_terms_;
+};
+
+} // namespace testing
+} // namespace chrome
+
+#endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_MOCK_TOOLBAR_MODEL_H_

Powered by Google App Engine
This is Rietveld 408576698