// Path: src/main/java/songo/SWTUtil.java
// public class SWTUtil {
// 	private final SongoService service;
// 
// 	@Inject
// 	SWTUtil(SongoService service) {
// 		this.service = service;
// 	}
// 
// 	public void exitOnClose(Shell shell) {
// 		shell.addShellListener(new ShellAdapter() {
// 			@Override
// 			public void shellClosed(ShellEvent e) {
// 				service.stop();
// 			}
// 		});
// 	}
// }


import com.google.common.eventbus.EventBus;
import com.google.inject.Inject;
import com.google.inject.servlet.SessionScoped;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.*;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import songo.SWTUtil;
import songo.annotation.BrowserStyle;
import songo.annotation.SessionBus;
package songo.view;


@SessionScoped
public class AuthDialog implements View {
	private final Shell shell;
	private final Browser browser;

	private static GridLayout gridLayout() {
		return gridLayout(1);
	}

	private static GridLayout gridLayout(int cols) {
		return new GridLayout(cols, false);
	}

	private static GridData horizontalFill() {
		return new GridData(SWT.FILL, SWT.CENTER, true, false);
	}

	@Inject
// Path: src/main/java/songo/SWTUtil.java
// public class SWTUtil {
// 	private final SongoService service;
// 
// 	@Inject
// 	SWTUtil(SongoService service) {
// 		this.service = service;
// 	}
// 
// 	public void exitOnClose(Shell shell) {
// 		shell.addShellListener(new ShellAdapter() {
// 			@Override
// 			public void shellClosed(ShellEvent e) {
// 				service.stop();
// 			}
// 		});
// 	}
// }


// Path: src/main/java/songo/view/AuthDialog.java
import com.google.common.eventbus.EventBus;
import com.google.inject.Inject;
import com.google.inject.servlet.SessionScoped;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.*;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import songo.SWTUtil;
import songo.annotation.BrowserStyle;
import songo.annotation.SessionBus;

package songo.view;


@SessionScoped
public class AuthDialog implements View {
	private final Shell shell;
	private final Browser browser;

	private static GridLayout gridLayout() {
		return gridLayout(1);
	}

	private static GridLayout gridLayout(int cols) {
		return new GridLayout(cols, false);
	}

	private static GridData horizontalFill() {
		return new GridData(SWT.FILL, SWT.CENTER, true, false);
	}

	@Inject
	AuthDialog(Shell shell, SWTUtil util, @BrowserStyle Integer browserStyle, @SessionBus final EventBus bus) {