Switch to gwtexpui's iframe busting code
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -36,6 +36,7 @@ import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.MenuBar;
|
||||
import com.google.gwt.user.client.ui.MenuItem;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwtexpui.user.client.UserAgent;
|
||||
import com.google.gwtjsonrpc.client.JsonUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -173,11 +174,7 @@ public class Gerrit implements EntryPoint {
|
||||
}
|
||||
|
||||
public void onModuleLoad() {
|
||||
if (GWT.isScript() && amInsideIFrame()) {
|
||||
bustOutOfIFrame(Window.Location.getHref());
|
||||
return;
|
||||
}
|
||||
|
||||
UserAgent.assertNotInIFrame();
|
||||
initHistoryHooks();
|
||||
populateBottomMenu();
|
||||
|
||||
@@ -198,12 +195,6 @@ public class Gerrit implements EntryPoint {
|
||||
});
|
||||
}
|
||||
|
||||
private static native boolean amInsideIFrame()
|
||||
/*-{ return top.location != $wnd.location; }-*/;
|
||||
|
||||
private static native void bustOutOfIFrame(String newloc)
|
||||
/*-{ top.location.href = newloc }-*/;
|
||||
|
||||
private static ArrayList<JavaScriptObject> historyHooks;
|
||||
|
||||
private static native void initHistoryHooks()
|
||||
|
||||
Reference in New Issue
Block a user