Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Side by Side Diff: Source/core/frame/BarProp.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/fileapi/FileReaderSync.cpp ('k') | Source/core/frame/Console.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 #include "core/page/Chrome.h" 32 #include "core/page/Chrome.h"
33 #include "core/frame/FrameHost.h" 33 #include "core/frame/FrameHost.h"
34 #include "core/frame/LocalFrame.h" 34 #include "core/frame/LocalFrame.h"
35 35
36 namespace blink { 36 namespace blink {
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);
43 } 42 }
44 43
45 bool BarProp::visible() const 44 bool BarProp::visible() const
46 { 45 {
47 if (!m_frame) 46 if (!m_frame)
48 return false; 47 return false;
49 FrameHost* host = m_frame->host(); 48 FrameHost* host = m_frame->host();
50 if (!host) 49 if (!host)
51 return false; 50 return false;
52 51
53 switch (m_type) { 52 switch (m_type) {
54 case Locationbar: 53 case Locationbar:
55 case Personalbar: 54 case Personalbar:
56 case Toolbar: 55 case Toolbar:
57 return host->chrome().toolbarsVisible(); 56 return host->chrome().toolbarsVisible();
58 case Menubar: 57 case Menubar:
59 return host->chrome().menubarVisible(); 58 return host->chrome().menubarVisible();
60 case Scrollbars: 59 case Scrollbars:
61 return host->chrome().scrollbarsVisible(); 60 return host->chrome().scrollbarsVisible();
62 case Statusbar: 61 case Statusbar:
63 return host->chrome().statusbarVisible(); 62 return host->chrome().statusbarVisible();
64 } 63 }
65 64
66 ASSERT_NOT_REACHED(); 65 ASSERT_NOT_REACHED();
67 return false; 66 return false;
68 } 67 }
69 68
70 } // namespace blink 69 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fileapi/FileReaderSync.cpp ('k') | Source/core/frame/Console.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698