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

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

Issue 2716153003: Removed FrameHost::chromeClient() (Closed)
Patch Set: Small feedback Created 3 years, 9 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
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 10 matching lines...) Expand all
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "core/frame/BarProp.h" 29 #include "core/frame/BarProp.h"
30 30
31 #include "core/frame/FrameHost.h"
32 #include "core/frame/LocalFrame.h" 31 #include "core/frame/LocalFrame.h"
33 #include "core/page/ChromeClient.h" 32 #include "core/page/ChromeClient.h"
33 #include "core/page/Page.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 BarProp::BarProp(LocalFrame* frame, Type type) 37 BarProp::BarProp(LocalFrame* frame, Type type)
38 : DOMWindowClient(frame), m_type(type) {} 38 : DOMWindowClient(frame), m_type(type) {}
39 39
40 DEFINE_TRACE(BarProp) { 40 DEFINE_TRACE(BarProp) {
41 DOMWindowClient::trace(visitor); 41 DOMWindowClient::trace(visitor);
42 } 42 }
43 43
44 bool BarProp::visible() const { 44 bool BarProp::visible() const {
45 if (!frame()) 45 if (!frame())
46 return false; 46 return false;
47 DCHECK(frame()->host()); 47 DCHECK(frame()->page());
48 48
49 switch (m_type) { 49 switch (m_type) {
50 case Locationbar: 50 case Locationbar:
51 case Personalbar: 51 case Personalbar:
52 case Toolbar: 52 case Toolbar:
53 return frame()->host()->chromeClient().toolbarsVisible(); 53 return frame()->page()->chromeClient().toolbarsVisible();
54 case Menubar: 54 case Menubar:
55 return frame()->host()->chromeClient().menubarVisible(); 55 return frame()->page()->chromeClient().menubarVisible();
56 case Scrollbars: 56 case Scrollbars:
57 return frame()->host()->chromeClient().scrollbarsVisible(); 57 return frame()->page()->chromeClient().scrollbarsVisible();
58 case Statusbar: 58 case Statusbar:
59 return frame()->host()->chromeClient().statusbarVisible(); 59 return frame()->page()->chromeClient().statusbarVisible();
60 } 60 }
61 61
62 NOTREACHED(); 62 NOTREACHED();
63 return false; 63 return false;
64 } 64 }
65 65
66 } // namespace blink 66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698