|
31 | 31 | import org.cef.callback.CefDownloadItemCallback; |
32 | 32 | import org.cef.callback.CefDragData; |
33 | 33 | import org.cef.callback.CefFileDialogCallback; |
34 | | -import org.cef.callback.CefGeolocationCallback; |
35 | 34 | import org.cef.callback.CefJSDialogCallback; |
36 | 35 | import org.cef.callback.CefMenuModel; |
37 | 36 | import org.cef.callback.CefRequestCallback; |
|
42 | 41 | import org.cef.handler.CefDownloadHandler; |
43 | 42 | import org.cef.handler.CefDragHandler; |
44 | 43 | import org.cef.handler.CefFocusHandler; |
45 | | -import org.cef.handler.CefGeolocationHandler; |
46 | 44 | import org.cef.handler.CefJSDialogHandler; |
47 | 45 | import org.cef.handler.CefKeyboardHandler; |
48 | 46 | import org.cef.handler.CefLifeSpanHandler; |
|
64 | 62 | */ |
65 | 63 | public class CefClient extends CefClientHandler |
66 | 64 | implements CefContextMenuHandler, CefDialogHandler, CefDisplayHandler, CefDownloadHandler, |
67 | | - CefDragHandler, CefFocusHandler, CefGeolocationHandler, CefJSDialogHandler, |
68 | | - CefKeyboardHandler, CefLifeSpanHandler, CefLoadHandler, CefRenderHandler, |
69 | | - CefRequestHandler, CefWindowHandler { |
| 65 | + CefDragHandler, CefFocusHandler, CefJSDialogHandler, CefKeyboardHandler, |
| 66 | + CefLifeSpanHandler, CefLoadHandler, CefRenderHandler, CefRequestHandler, |
| 67 | + CefWindowHandler { |
70 | 68 | private HashMap<Integer, CefBrowser> browser_ = new HashMap<Integer, CefBrowser>(); |
71 | 69 | private CefContextMenuHandler contextMenuHandler_ = null; |
72 | 70 | private CefDialogHandler dialogHandler_ = null; |
73 | 71 | private CefDisplayHandler displayHandler_ = null; |
74 | 72 | private CefDownloadHandler downloadHandler_ = null; |
75 | 73 | private CefDragHandler dragHandler_ = null; |
76 | 74 | private CefFocusHandler focusHandler_ = null; |
77 | | - private CefGeolocationHandler geolocationHandler_ = null; |
78 | 75 | private CefJSDialogHandler jsDialogHandler_ = null; |
79 | 76 | private CefKeyboardHandler keyboardHandler_ = null; |
80 | 77 | private CefLifeSpanHandler lifeSpanHandler_ = null; |
@@ -188,11 +185,6 @@ protected CefFocusHandler getFocusHandler() { |
188 | 185 | return this; |
189 | 186 | } |
190 | 187 |
|
191 | | - @Override |
192 | | - protected CefGeolocationHandler getGeolocationHandler() { |
193 | | - return this; |
194 | | - } |
195 | | - |
196 | 188 | @Override |
197 | 189 | protected CefJSDialogHandler getJSDialogHandler() { |
198 | 190 | return this; |
@@ -445,33 +437,6 @@ public void onGotFocus(CefBrowser browser) { |
445 | 437 | if (focusHandler_ != null) focusHandler_.onGotFocus(browser); |
446 | 438 | } |
447 | 439 |
|
448 | | - // CefGeolocationHandler |
449 | | - |
450 | | - public CefClient addGeolocationHandler(CefGeolocationHandler handler) { |
451 | | - if (geolocationHandler_ == null) geolocationHandler_ = handler; |
452 | | - return this; |
453 | | - } |
454 | | - |
455 | | - public void removeGeolocationHandler() { |
456 | | - geolocationHandler_ = null; |
457 | | - } |
458 | | - |
459 | | - @Override |
460 | | - public boolean onRequestGeolocationPermission(CefBrowser browser, String requesting_url, |
461 | | - int request_id, CefGeolocationCallback callback) { |
462 | | - if (geolocationHandler_ != null && browser != null) { |
463 | | - return geolocationHandler_.onRequestGeolocationPermission( |
464 | | - browser, requesting_url, request_id, callback); |
465 | | - } |
466 | | - return false; |
467 | | - } |
468 | | - |
469 | | - @Override |
470 | | - public void onCancelGeolocationPermission(CefBrowser browser, int request_id) { |
471 | | - if (geolocationHandler_ != null && browser != null) |
472 | | - geolocationHandler_.onCancelGeolocationPermission(browser, request_id); |
473 | | - } |
474 | | - |
475 | 440 | // CefJSDialogHandler |
476 | 441 |
|
477 | 442 | public CefClient addJSDialogHandler(CefJSDialogHandler handler) { |
@@ -595,7 +560,6 @@ public void onBeforeClose(CefBrowser browser) { |
595 | 560 | removeDownloadHandler(this); |
596 | 561 | removeDragHandler(this); |
597 | 562 | removeFocusHandler(this); |
598 | | - removeGeolocationHandler(this); |
599 | 563 | removeJSDialogHandler(this); |
600 | 564 | removeKeyboardHandler(this); |
601 | 565 | removeLifeSpanHandler(this); |
|
0 commit comments