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

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

Issue 2626423003: Use DOMWindowClient for objects owned by LocalDOMWindow (Closed)
Patch Set: Created 3 years, 11 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 17 matching lines...) Expand all
28 28
29 #include "core/frame/BarProp.h" 29 #include "core/frame/BarProp.h"
30 30
31 #include "core/frame/FrameHost.h" 31 #include "core/frame/FrameHost.h"
32 #include "core/frame/LocalFrame.h" 32 #include "core/frame/LocalFrame.h"
33 #include "core/page/ChromeClient.h" 33 #include "core/page/ChromeClient.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 : ContextClient(frame), m_type(type) {} 38 : DOMWindowClient(frame), m_type(type) {}
39 39
40 DEFINE_TRACE(BarProp) { 40 DEFINE_TRACE(BarProp) {
41 ContextClient::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()->host());
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()->host()->chromeClient().toolbarsVisible();
54 case Menubar: 54 case Menubar:
55 return frame()->host()->chromeClient().menubarVisible(); 55 return frame()->host()->chromeClient().menubarVisible();
56 case Scrollbars: 56 case Scrollbars:
57 return frame()->host()->chromeClient().scrollbarsVisible(); 57 return frame()->host()->chromeClient().scrollbarsVisible();
58 case Statusbar: 58 case Statusbar:
59 return frame()->host()->chromeClient().statusbarVisible(); 59 return frame()->host()->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
« no previous file with comments | « third_party/WebKit/Source/core/frame/BarProp.h ('k') | third_party/WebKit/Source/core/frame/History.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698