OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Harri Porten (porten@kde.org) | 2 * Copyright (C) 2000 Harri Porten (porten@kde.org) |
3 * Copyright (c) 2000 Daniel Molkentin (molkentin@kde.org) | 3 * Copyright (c) 2000 Daniel Molkentin (molkentin@kde.org) |
4 * Copyright (c) 2000 Stefan Schimanski (schimmi@kde.org) | 4 * Copyright (c) 2000 Stefan Schimanski (schimmi@kde.org) |
5 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "core/frame/NavigatorID.h" | 30 #include "core/frame/NavigatorID.h" |
31 #include "core/frame/Settings.h" | 31 #include "core/frame/Settings.h" |
32 #include "core/loader/CookieJar.h" | 32 #include "core/loader/CookieJar.h" |
33 #include "core/loader/FrameLoader.h" | 33 #include "core/loader/FrameLoader.h" |
34 #include "core/page/Chrome.h" | 34 #include "core/page/Chrome.h" |
35 #include "core/page/ChromeClient.h" | 35 #include "core/page/ChromeClient.h" |
36 #include "core/plugins/DOMMimeTypeArray.h" | 36 #include "core/plugins/DOMMimeTypeArray.h" |
37 #include "core/plugins/DOMPluginArray.h" | 37 #include "core/plugins/DOMPluginArray.h" |
38 #include "platform/Language.h" | 38 #include "platform/Language.h" |
39 | 39 |
40 #ifndef WEBCORE_NAVIGATOR_PRODUCT_SUB | |
41 #define WEBCORE_NAVIGATOR_PRODUCT_SUB "20030107" | |
42 #endif // ifndef WEBCORE_NAVIGATOR_PRODUCT_SUB | |
43 | |
44 #ifndef WEBCORE_NAVIGATOR_VENDOR | |
45 #define WEBCORE_NAVIGATOR_VENDOR "Google Inc." | |
46 #endif // ifndef WEBCORE_NAVIGATOR_VENDOR | |
47 | |
48 #ifndef WEBCORE_NAVIGATOR_VENDOR_SUB | |
49 #define WEBCORE_NAVIGATOR_VENDOR_SUB "" | |
50 #endif // ifndef WEBCORE_NAVIGATOR_VENDOR_SUB | |
51 | |
52 namespace blink { | 40 namespace blink { |
53 | 41 |
54 Navigator::Navigator(LocalFrame* frame) | 42 Navigator::Navigator(LocalFrame* frame) |
55 : DOMWindowProperty(frame) | 43 : DOMWindowProperty(frame) |
56 { | 44 { |
57 } | 45 } |
58 | 46 |
59 Navigator::~Navigator() | 47 Navigator::~Navigator() |
60 { | 48 { |
61 } | 49 } |
62 | 50 |
63 String Navigator::productSub() const | 51 String Navigator::productSub() const |
64 { | 52 { |
65 return WEBCORE_NAVIGATOR_PRODUCT_SUB; | 53 return "20030107"; |
66 } | 54 } |
67 | 55 |
68 String Navigator::vendor() const | 56 String Navigator::vendor() const |
69 { | 57 { |
70 return WEBCORE_NAVIGATOR_VENDOR; | 58 // Do not change without good cause. History: |
| 59 // https://code.google.com/p/chromium/issues/detail?id=276813 |
| 60 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=27786 |
| 61 // https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Qrgyulnq
vmE |
| 62 return "Google Inc."; |
71 } | 63 } |
72 | 64 |
73 String Navigator::vendorSub() const | 65 String Navigator::vendorSub() const |
74 { | 66 { |
75 return WEBCORE_NAVIGATOR_VENDOR_SUB; | 67 return ""; |
76 } | 68 } |
77 | 69 |
78 String Navigator::userAgent() const | 70 String Navigator::userAgent() const |
79 { | 71 { |
80 // If the frame is already detached it no longer has a meaningful useragent. | 72 // If the frame is already detached it no longer has a meaningful useragent. |
81 if (!m_frame || !m_frame->page()) | 73 if (!m_frame || !m_frame->page()) |
82 return String(); | 74 return String(); |
83 | 75 |
84 return m_frame->loader().userAgent(m_frame->document()->url()); | 76 return m_frame->loader().userAgent(m_frame->document()->url()); |
85 } | 77 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 { | 147 { |
156 #if ENABLE(OILPAN) | 148 #if ENABLE(OILPAN) |
157 visitor->trace(m_plugins); | 149 visitor->trace(m_plugins); |
158 visitor->trace(m_mimeTypes); | 150 visitor->trace(m_mimeTypes); |
159 HeapSupplementable<Navigator>::trace(visitor); | 151 HeapSupplementable<Navigator>::trace(visitor); |
160 #endif | 152 #endif |
161 DOMWindowProperty::trace(visitor); | 153 DOMWindowProperty::trace(visitor); |
162 } | 154 } |
163 | 155 |
164 } // namespace blink | 156 } // namespace blink |
OLD | NEW |