Create a new privateBrowsing instance.

@class This class adds support for the Private Browsing mode
@param {MozMillController} controller
MozMillController to use for the modal entry dialog
323817
function privateBrowsing(controller) {
  this._controller = controller;
  this._handler = null;

  /**
   * Menu item in the main menu to enter/leave Private Browsing mode
   * @private
   */
  this._pbMenuItem = new elementslib.Elem(this._controller.menus['tools-menu'].privateBrowsingItem);
  this._pbTransitionItem = new elementslib.ID(this._controller.window.document, "Tools:PrivateBrowsing");

  this.__defineGetter__('_pbs', function() {
    delete this._pbs;
    return this._pbs = Cc["@mozilla.org/privatebrowsing;1"].
                       getService(Ci.nsIPrivateBrowsingService);
  });
}
800404
function wrapClass(Controller) {
  let proto = Controller.prototype;
  const ret = {};
  // tracing the prototype chain
  while (proto !== Object.prototype) {
    const keys = Object.getOwnPropertyNames(proto);
    for (const key of keys) {
      // getOwnPropertyNames will return constructor
      // that should be ignored
      if (key === 'constructor') {
        continue;
      }
      // skip getter, setter & non-function properties
      const d = Object.getOwnPropertyDescriptor(proto, key);
      // prevent to override sub method
      if (is.function(d.value) && !ret.hasOwnProperty(key)) {
        ret[key] = methodToMiddleware(Controller, key);
        ret[key][FULLPATH] = Controller.prototype.fullPath + '#' + Controller.name + '.' + key + '()';
      }
    }
    proto = Object.getPrototypeOf(proto);
  }
  return ret;

  function methodToMiddleware(Controller, key) {
    return function classControllerMiddleware(...args) {
      const controller = new Controller(this);
      if (!this.app.config.controller || !this.app.config.controller.supportParams) {
        args = [ this ];
      }
      return utils.callFn(controller[key], args, controller);
    };
  }
}
773245
function searchBar_openEngineManager(handler)
  {
    this.enginesDropDownOpen = true;
    var engineManager = this.getElement({type: "engine_manager"});

    // Setup the modal dialog handler
    md = new modalDialog.modalDialog(this._controller.window);
    md.start(handler);

    // XXX: Bug 555347 - Process any outstanding events before clicking the entry
    this._controller.sleep(0);
    this._controller.click(engineManager);
    md.waitForDialog();

    this._controller.assert(function () {
      return this.enginesDropDownOpen == false;
    }, "The search engine drop down menu has been closed", this);
  }
442927
@Override
    protected void onOk() {

        m_controller.createNewModelPage(
            m_titleInput.getFormValueAsString(),
            m_descriptionInput.getFormValueAsString(),
            null,
            m_isModelGroup);
        hide();
    }
439133
function(action) {
			var self = this;

			if (action == 'show') {
				// Modal is open so update scope
				self.scope.is_open = true;

				// set body to overflow hidden if background_scroll is false
				if (! self.options.background_scroll) {
					self.dom.addClass('modaal-noscroll');
				}

				// append modaal overlay
				if ($('#' + self.scope.id + '_overlay').length < 1) {
					self.dom.append('<div class="modaal-overlay" id="' + self.scope.id + '_overlay"></div>');
				}

				// now show
				$('#' + self.scope.id + '_overlay').css('background', self.options.background).stop().animate({
					opacity: self.options.overlay_opacity
				}, self.options.animation_speed, function(){
					// now open the modal
					self.modaal_open();
				});

			} else if (action == 'hide') {

				// now hide the overlay
				$('#' + self.scope.id + '_overlay').stop().animate({
					opacity: 0
				}, self.options.animation_speed, function(){
					// remove overlay from dom
					$(this).remove();

					// remove body overflow lock
					self.dom.removeClass('modaal-noscroll');
				});
			}
		}
336614
@Bind(aggregate = true, optional = true)
    public synchronized void bindController(Controller controller) {
        LOGGER.info("Adding routes from " + controller);

        List<Route> newRoutes = new ArrayList<>();
        try {

            List<Route> annotatedNewRoutes = RouteUtils.collectRouteFromControllerAnnotations(controller);
            newRoutes.addAll(annotatedNewRoutes);
            newRoutes.addAll(controller.routes());

            //check if these new routes don't pre-exist
            ensureNoConflicts(newRoutes);

        } catch (RoutingException e) {
            LOGGER.error("The controller {} declares routes conflicting with existing routes, " +
                    "the controller is ignored, reason: {}", controller, e.getMessage(), e);
            // remove all new routes as one has failed
            routes.removeAll(newRoutes);  //NOSONAR
        } catch (Exception e) {
            LOGGER.error("The controller {} declares invalid routes, " +
                    "the controller is ignored, reason: {}", controller, e.getMessage(), e);
            // remove all new routes as one has failed
            routes.removeAll(newRoutes); //NOSONAR
        }
    }
588011
function BLETransport(opts) {
  if (!(this instanceof BLETransport)) {
    return new BLETransport(opts);
  }

  this.configuration = opts.configuration;
  this.controller = Controllers[this.configuration.controller];
  if (!this.controller) {
    throw new Error("No valid BLE controller defined");
  }
}
499238
function $controllerIntrospectorProvider() {
  var controllers = [];
  var controllersByName = {};
  var onControllerRegistered = null;
  return {
    register: function (name, constructor) {
      if (angular.isArray(constructor)) {
        constructor = constructor[constructor.length - 1];
      }
      controllersByName[name] = constructor;
      if (constructor.$routeConfig) {
        if (onControllerRegistered) {
          onControllerRegistered(name, constructor.$routeConfig);
        } else {
          controllers.push({name: name, config: constructor.$routeConfig});
        }
      }
    },
    $get: ['$componentMapper', function ($componentMapper) {
      var fn = function (newOnControllerRegistered) {
        onControllerRegistered = function (name, constructor) {
          name = $componentMapper.component(name);
          return newOnControllerRegistered(name, constructor);
        };
        while(controllers.length > 0) {
          var rule = controllers.pop();
          onControllerRegistered(rule.name, rule.config);
        }
      };

      fn.getTypeByName = function (name) {
        return controllersByName[name];
      };

      return fn;
    }]
  }
}
851057
protected function createResourceController()
    {
        Artisan::call('make:controller', [
            'name' => $controller = $this->controllerWithoutMethod($this->action()),
            '--resource' => true
        ]);
        $this->info('Resource Controller ' . $controller .' created.');
        $this->createView($this->argument('link'));
    }
304381
public void initInlineEditor(final CmsContainerpageController controller) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_noEditReason)
            && !m_disableNewEditor
            && CmsContentEditor.setEditable(getElement(), CmsContainerpageController.getServerId(m_clientId), true)) {
            if (m_editorClickHandlerRegistration != null) {
                m_editorClickHandlerRegistration.removeHandler();
            }
            m_editorClickHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {

                public void onPreviewNativeEvent(NativePreviewEvent event) {

                    if (event.getTypeInt() == Event.ONCLICK) {
                        // if another content is already being edited, don't start another editor
                        if (controller.isContentEditing()) {
                            return;
                        }
                        Element eventTarget = event.getNativeEvent().getEventTarget().cast();
                        // check if the event target is a child
                        if (getElement().isOrHasChild(eventTarget)) {
                            Element target = event.getNativeEvent().getEventTarget().cast();
                            // check if the target closest ancestor drag element is this element
                            Element parentContainerElement = CmsDomUtil.getAncestor(
                                target,
                                I_CmsLayoutBundle.INSTANCE.dragdropCss().dragElement());
                            if (parentContainerElement == getElement()) {
                                while ((target != null)
                                    && !target.getTagName().equalsIgnoreCase("a")
                                    && (target != getElement())) {
                                    if (CmsContentEditor.isEditable(target)) {
                                        CmsEditorBase.markForInlineFocus(target);
                                        controller.getHandler().openEditorForElement(
                                            CmsContainerPageElementPanel.this,
                                            true,
                                            isNew());
                                        removeEditorHandler();
                                        event.cancel();
                                        break;
                                    } else {
                                        target = target.getParentElement();
                                    }
                                }
                            }
                        }
                    }
                }
            });
        }
    }
636026
function(controller, callback) {

            // Allow configure-method less controllers
            if ('function' !== typeof controller.configure) {
                return callback(null, controller);
            }

            controller.configure(
                self.worker.app,
                self.worker.server,
            function(err) {
                callback(err, controller);
            });
        }
528086
protected function createController()
	{

		$singular = str_singular( $this->name );
		$camelSingular = lcfirst( $singular );

		$tmpl = file_get_contents( __DIR__ . "/Controller.tmpl" );
		$tmpl = str_replace(
			[
				'{{NAME}}',
				'{{NAMESPACE}}',
				'{{DELETE_METHOD}}',
				'{{IDNAME}}' ,
				'{{CREATE_METHOD}}',
				'{{CREATE_REQUEST}}',
				'{{SHOW_CREATE_METHOD}}',
				'{{EDIT_METHOD}}',
				'{{EDIT_REQUEST}}',
				'{{SHOW_EDIT_METHOD}}'
			],
			[
				$this->name,
				$this->namespace,
				"delete{$singular}",
				"{$camelSingular}ID",
				"create{$singular}",
				"Create{$singular}Request",
				"showCreate{$singular}",
				"edit{$singular}",
				"Edit{$singular}Request",
				"showEdit{$singular}"
			],
			 $tmpl );
		$path = app_path( "Http/Controllers/{$this->name}Controller.php" );
		if( ! file_exists( $path ) ) {
			file_put_contents( $path, $tmpl );
		}
	}
224566
def create_controller_handler(full_path, controller_path)
      # If arguments is nil, then an blank SubContext will be created
      args = [SubContext.new(@arguments, nil, true)]

      # get the controller class and action
      controller_class, action = ControllerHandler.get_controller_and_action(controller_path)

      generated_new = false
      new_controller = proc do
        # Mark that we needed to generate a new controller instance (not reused
        # from the group)
        generated_new = true
        # Setup the controller
        controller_class.new(@volt_app, *args)
      end

      # Fetch grouped controllers if we're grouping
      if @grouped_controller
        # Find the controller in the group, or create it
        controller = @grouped_controller.lookup_or_create(controller_class, &new_controller)
      else
        # Just create the controller
        controller = new_controller.call
      end

      handler = ControllerHandler.fetch(controller, action)

      if generated_new
        # Call the action
        stopped = handler.call_action

        controller.instance_variable_set('@chain_stopped', true) if stopped
      else
        stopped = controller.instance_variable_get('@chain_stopped')
      end

      [handler, generated_new, stopped]
    end
1035243
function ResizeController(options) {
  if (!(this instanceof ResizeController)) {
    return new ResizeController(options);
  }

  Emitter.mixin(this);

  options = options || {};

  var resizeStream = ResizeStream.create(options);
  Stream.onValue(resizeStream, Util.partial(this.trigger, 'resize'));

  var debounceMs = Util.getOption(options.debounceMs, 200);
  var resizeEndStream = debounceMs <= 0 ? resizeStream : Stream.debounce(
    debounceMs,
    resizeStream
  );
  Stream.onValue(resizeEndStream, Util.partial(this.trigger, 'resizeEnd'));

  this.destroy = function() {
    Stream.close(resizeStream);
    this.off('resize');
    this.off('resizeEnd');
  };
}
1369480
public void setController(@Nullable DraweeController draweeController) {
    mDraweeHolder.setController(draweeController);
    super.setImageDrawable(mDraweeHolder.getTopLevelDrawable());
  }
763270
public static function contentcontrollerInit($controller)
    {
        $subsite = Subsite::currentSubsite();

        if ($subsite && $subsite->Theme) {
            SSViewer::add_themes([$subsite->Theme]);
        }

        if ($subsite && i18n::getData()->validate($subsite->Language)) {
            i18n::set_locale($subsite->Language);
        }
    }
944488
@Override
    public void visit(ClassOrInterfaceDeclaration declaration, ControllerModel controller) {
        controller.setName(declaration.getName());

        LOGGER.info("[controller]Visit " + controller.getName());
        //Go on with the methods and annotations
        super.visit(declaration,controller);
    }