It's possible to pass custom variables into Views?
You have to write a custom module that creates a suitable handler (for example, a Views area handler). In that handler you can read your custom variable and act accordingly.

Keep in mind Views cache. So, if you change that variable you should invalidate the cache object for that view or views that uses that handler.