File tree Expand file tree Collapse file tree 5 files changed +42
-1
lines changed
Expand file tree Collapse file tree 5 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,19 @@ - (void)executeSceneChangeJSCallback:(const char *)name
324324 }];
325325}
326326
327+ - (void )refreshPageNoCache : (const int )browserIdentifier
328+ {
329+ [self sendEvent: browserIdentifier
330+ event: ^(SharedBrowserHandle browserHandle)
331+ {
332+ CefRefPtr<CefBrowser> browser = browserHandle->GetBrowser ();
333+
334+ browser->ReloadIgnoreCache ();
335+ }];
336+ }
337+
338+
339+
327340- (void )destroyBrowser : (const int )browserIdentifier {
328341 if (map.count (browserIdentifier) == 1 ) {
329342 std::shared_ptr<BrowserHandle> browserHandle =
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ class BrowserManager::Impl {
5353 void ExecuteVisiblityJSCallback (int browserIdentifier, bool visible);
5454
5555 void ExecuteSceneChangeJSCallback (const char *name);
56+
57+ void RefreshPageNoCache (int browserIdentifier);
5658
5759private:
5860 std::unique_ptr<CEFIsolationServiceManager> cefIsolationServiceManager;
Original file line number Diff line number Diff line change 9191 pimpl->ExecuteSceneChangeJSCallback (name);
9292}
9393
94+ void BrowserManager::RefreshPageNoCache (int browserIdentifier)
95+ {
96+ pimpl->RefreshPageNoCache (browserIdentifier);
97+ }
98+
9499int BrowserManager::CreateBrowser (const BrowserSettings &browserSettings,
95100 const std::shared_ptr<BrowserListener> &browserListener)
96101{
181186 cefIsolationServiceManager->ExecuteSceneChangeJSCallback (name);
182187}
183188
189+ void BrowserManager::Impl::RefreshPageNoCache (int browserIdentifier)
190+ {
191+ cefIsolationServiceManager->RefreshPageNoCache (browserIdentifier);
192+ }
193+
184194static BrowserManager *instance;
185195
186196BrowserManager *BrowserManager::Instance ()
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ class CEFIsolationServiceManager {
5959 void ExecuteVisiblityJSCallback (int browserIdentifier, bool visible);
6060
6161 void ExecuteSceneChangeJSCallback (const char *name);
62+
63+ void RefreshPageNoCache (int browserIdentifier);
6264
6365public:
6466 NSString *GetUniqueClientName () { return _uniqueClientName; }
Original file line number Diff line number Diff line change 247247}
248248
249249void CEFIsolationServiceManager::ExecuteSceneChangeJSCallback (const char *name)
250+ {
251+ id <CEFIsolatedClient> cefIsolatedClient =
252+ [_cefIsolationService client ];
253+ @try {
254+ [cefIsolatedClient executeSceneChangeJSCallback: name];
255+ }
256+ @catch (NSException *exception) {}
257+ }
258+
259+ void CEFIsolationServiceManager::RefreshPageNoCache (int browserIdentifier)
250260{
251261 id <CEFIsolatedClient> cefIsolatedClient =
252262 [_cefIsolationService client ];
253263 @try {
254- [cefIsolatedClient executeSceneChangeJSCallback: name ];
264+ [cefIsolatedClient refreshPageNoCache: browserIdentifier ];
255265 }
256266 @catch (NSException *exception) {}
257267}
268+
269+
270+
271+
You can’t perform that action at this time.
0 commit comments