The City having jurisdiction over building permits will have the specific details. It is my understanding that in order to be considered a bedroom in Oakland, the room must be at least 70 square feet. It must have at least one window that works and, if it has security bars, it must have a quick release mechanism. The current codes are very specific on the measurements of the window and height off the floor. A bedroom must also have 2 exits (a window is considered one). The minimum ceiling height is 7'6." Last, but not least, it should have a closet although that is not specified in the code. However, in order for the room to be considered a bedroom, it is preferred, but not mandatory, that the closet be built-in. The closet can also be portable.