| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 BarProp::BarProp(LocalFrame* frame, Type type) | 38 BarProp::BarProp(LocalFrame* frame, Type type) |
| 39 : DOMWindowProperty(frame) | 39 : DOMWindowProperty(frame) |
| 40 , m_type(type) | 40 , m_type(type) |
| 41 { | 41 { |
| 42 ScriptWrappable::init(this); | 42 ScriptWrappable::init(this); |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool BarProp::visible() const | 45 bool BarProp::visible() const |
| 46 { | 46 { |
| 47 ASSERT(m_frame); | |
| 48 if (!m_frame) | 47 if (!m_frame) |
| 49 return false; | 48 return false; |
| 50 FrameHost* host = m_frame->host(); | 49 FrameHost* host = m_frame->host(); |
| 51 if (!host) | 50 if (!host) |
| 52 return false; | 51 return false; |
| 53 | 52 |
| 54 switch (m_type) { | 53 switch (m_type) { |
| 55 case Locationbar: | 54 case Locationbar: |
| 56 case Personalbar: | 55 case Personalbar: |
| 57 case Toolbar: | 56 case Toolbar: |
| 58 return host->chrome().toolbarsVisible(); | 57 return host->chrome().toolbarsVisible(); |
| 59 case Menubar: | 58 case Menubar: |
| 60 return host->chrome().menubarVisible(); | 59 return host->chrome().menubarVisible(); |
| 61 case Scrollbars: | 60 case Scrollbars: |
| 62 return host->chrome().scrollbarsVisible(); | 61 return host->chrome().scrollbarsVisible(); |
| 63 case Statusbar: | 62 case Statusbar: |
| 64 return host->chrome().statusbarVisible(); | 63 return host->chrome().statusbarVisible(); |
| 65 } | 64 } |
| 66 | 65 |
| 67 ASSERT_NOT_REACHED(); | 66 ASSERT_NOT_REACHED(); |
| 68 return false; | 67 return false; |
| 69 } | 68 } |
| 70 | 69 |
| 71 } // namespace WebCore | 70 } // namespace WebCore |
| OLD | NEW |