Like Mutt says, not in flight per FAA. I'm sure that a United crew would be happy to have you up front prior to push back. I'd ask the gate agent if they would pass you request to the Captain. Being neatly dressed and not in scruffy shorts, t-shirt and sandals, will increase your chances. On a 777 there will probably be 3 pilots who will get there about an hour prior to pushback. I'd be there before that so your request can be passed to the Captain when he arrives. Keep an eye to see if the gate agent actually passes your request -- remember they're pretty busy closing out the flight, so politely remind them if it doesn't look like they passed the request. I wouldn't recommend counting on getting up front post-flight -- usually the pilots pack up pretty quick before you can physically get past everyone in the aisle and up to the cockpit.