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

Unified Diff: ios/chrome/browser/ui/url_loader.h

Issue 942793002: [iOS] Upstream chrome commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « ios/chrome/browser/ui/commands/open_url_command.mm ('k') | ios/chrome/ios_chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/url_loader.h
diff --git a/ios/chrome/browser/ui/url_loader.h b/ios/chrome/browser/ui/url_loader.h
new file mode 100644
index 0000000000000000000000000000000000000000..88d22535657abe1e55d40c189ea75b798d34b36e
--- /dev/null
+++ b/ios/chrome/browser/ui/url_loader.h
@@ -0,0 +1,62 @@
+// Copyright 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 IOS_CHROME_BROWSER_UI_URL_LOADER_H_
+#define IOS_CHROME_BROWSER_UI_URL_LOADER_H_
+
+#import <UIKit/UIKit.h>
+
+#include "base/strings/string16.h"
+#include "ui/base/page_transition_types.h"
+
+class GURL;
+
+namespace sessions {
+struct SessionTab;
+}
+
+namespace web {
+struct Referrer;
+}
+
+// Describes the intended position for a new tab.
+enum OpenPosition {
+ kCurrentTab, // Relative to currently selected tab.
+ kLastTab // Always at end of tab model.
+};
+
+@protocol UrlLoader<NSObject>
+
+// Load a new url.
+- (void)loadURL:(const GURL&)url
+ referrer:(const web::Referrer&)referrer
+ transition:(ui::PageTransition)transition
+ rendererInitiated:(BOOL)rendererInitiated;
+
+// Load a new URL on a new page/tab. The |referrer| and |windowName| are
+// optional. The tab will be placed in the model according to |appendTo|.
+- (void)webPageOrderedOpen:(const GURL&)url
+ referrer:(const web::Referrer&)referrer
+ windowName:(NSString*)windowName
+ inBackground:(BOOL)inBackground
+ appendTo:(OpenPosition)appendTo;
+
+// Load a new URL on a new page/tab. The |referrer| and |windowName| are
+// optional. The tab will be placed in the model according to |appendTo|.
+- (void)webPageOrderedOpen:(const GURL&)url
+ referrer:(const web::Referrer&)referrer
+ windowName:(NSString*)windowName
+ inIncognito:(BOOL)inIncognito
+ inBackground:(BOOL)inBackground
+ appendTo:(OpenPosition)appendTo;
+
+// Load a tab with the given session.
+- (void)loadSessionTab:(const sessions::SessionTab*)sessionTab;
+
+// Loads the text entered in the location bar as javascript.
+- (void)loadJavaScriptFromLocationBar:(NSString*)script;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_URL_LOADER_H_
« no previous file with comments | « ios/chrome/browser/ui/commands/open_url_command.mm ('k') | ios/chrome/ios_chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698