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

Unified Diff: ios/clean/chrome/browser/ui/omnibox/location_bar_mediator.h

Issue 2761343002: [ios] Adds LocationBarCoordinator. (Closed)
Patch Set: Rebased. Created 3 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
Index: ios/clean/chrome/browser/ui/omnibox/location_bar_mediator.h
diff --git a/ios/clean/chrome/browser/ui/omnibox/location_bar_mediator.h b/ios/clean/chrome/browser/ui/omnibox/location_bar_mediator.h
new file mode 100644
index 0000000000000000000000000000000000000000..69f6b42862c02843dd8061d22a014728d1d0ec28
--- /dev/null
+++ b/ios/clean/chrome/browser/ui/omnibox/location_bar_mediator.h
@@ -0,0 +1,37 @@
+// Copyright 2017 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 IOS_CLEAN_CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_MEDIATOR_H_
+#define IOS_CLEAN_CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_MEDIATOR_H_
+
+#import <Foundation/Foundation.h>
+#include <memory>
+
+#import "ios/shared/chrome/browser/ui/omnibox/location_bar_delegate.h"
+
+class LocationBarController;
+class WebStateList;
+
+// LocationBarMediator listens for notifications from various models and updates
+// the UI accordingly. Unlike other mediators in the new architecture,
+// LocationBarMediator is constrained to operate within the confines of the
+// cross-platform omnibox component. Specifically, LocationBarMediator does not
+// have a |consumer| property, but rather it updates the UI through methods on
+// LocationBarController and OmniboxViewIOS.
+@interface LocationBarMediator : NSObject<LocationBarDelegate>
+
+- (instancetype)initWithWebStateList:(WebStateList*)webStateList
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Sets the LocationBarController that this mediator should use when updating
+// UI. Unlike other mediators in the new architecture, LocationBarMediator
+// updates the UI through this LocationBarController object rather than through
+// a consumer.
+- (void)setLocationBar:(std::unique_ptr<LocationBarController>)locationBar;
+
+@end
+
+#endif // IOS_CLEAN_CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_MEDIATOR_H_

Powered by Google App Engine
This is Rietveld 408576698