43 self.__feature = feature |
43 self.__feature = feature |
44 self.__page = page |
44 self.__page = page |
45 self.__manager = manager |
45 self.__manager = manager |
46 |
46 |
47 self.__permissionFeatureTexts = { |
47 self.__permissionFeatureTexts = { |
48 # TODO: Qt 5.6 |
48 # TODO: Qt 5.7? |
49 ## QWebEnginePage.Notifications: |
49 ## QWebEnginePage.Notifications: |
50 ## self.tr("{0} wants to use desktop notifications."), |
50 ## self.tr("{0} wants to use desktop notifications."), |
51 QWebEnginePage.Geolocation: |
51 QWebEnginePage.Geolocation: |
52 self.tr("{0} wants to use your position."), |
52 self.tr("{0} wants to use your position."), |
53 QWebEnginePage.MediaAudioCapture: |
53 QWebEnginePage.MediaAudioCapture: |
54 self.tr("{0} wants to use your microphone."), |
54 self.tr("{0} wants to use your microphone."), |
55 QWebEnginePage.MediaVideoCapture: |
55 QWebEnginePage.MediaVideoCapture: |
56 self.tr("{0} wants to use your camera."), |
56 self.tr("{0} wants to use your camera."), |
57 QWebEnginePage.MediaAudioVideoCapture: |
57 QWebEnginePage.MediaAudioVideoCapture: |
58 self.tr("{0} wants to use your microphone and camera."), |
58 self.tr("{0} wants to use your microphone and camera."), |
|
59 QWebEnginePage.MouseLock: |
|
60 self.tr("{0} wants to lock your mouse."), |
59 } |
61 } |
60 self.__permissionFeatureIconNames = { |
62 self.__permissionFeatureIconNames = { |
61 # TODO: Qt 5.6 |
63 # TODO: Qt 5.7? |
62 ## QWebEnginePage.Notifications: "notification.png", |
64 ## QWebEnginePage.Notifications: "notification.png", |
63 QWebEnginePage.Geolocation: "geolocation.png", |
65 QWebEnginePage.Geolocation: "geolocation.png", |
64 QWebEnginePage.MediaAudioCapture: "audiocapture.png", |
66 QWebEnginePage.MediaAudioCapture: "audiocapture.png", |
65 QWebEnginePage.MediaVideoCapture: "camera.png", |
67 QWebEnginePage.MediaVideoCapture: "camera.png", |
66 QWebEnginePage.MediaAudioVideoCapture: "audio-video.png", |
68 QWebEnginePage.MediaAudioVideoCapture: "audio-video.png", |
|
69 QWebEnginePage.MouseLock: "mouse.png", |
67 } |
70 } |
68 |
71 |
69 self.setAutoFillBackground(True) |
72 self.setAutoFillBackground(True) |
70 self.__layout = QHBoxLayout() |
73 self.__layout = QHBoxLayout() |
71 self.setLayout(self.__layout) |
74 self.setLayout(self.__layout) |