Skip to content

Commit 28c0c07

Browse files
authored
[tvOS] cobalt shell: Adapt to https://crrev.com/c/4611305 (#7820)
Bug: 456692793
1 parent 9b45314 commit 28c0c07

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cobalt/shell/app/ios/shell_application_ios.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ - (void)scene:(UIScene*)scene
4141
willConnectToSession:(UISceneSession*)session
4242
options:(UISceneConnectionOptions*)connectionOptions {
4343
CHECK_EQ(1u, content::Shell::windows().size());
44-
UIWindow* window = content::Shell::windows()[0]->window();
44+
UIWindow* window = content::Shell::windows()[0]->window().Get();
4545

4646
// The rootViewController must be added after a windowScene is set
4747
// so stash it in a temp variable and then reattach it. If we don't

cobalt/shell/browser/shell_platform_delegate_ios.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "third_party/perfetto/include/perfetto/tracing/core/trace_config.h"
2929
#include "third_party/perfetto/include/perfetto/tracing/tracing.h"
3030
#include "ui/display/screen.h"
31+
#include "ui/gfx/native_widget_types.h"
3132

3233
#if !defined(__has_feature) || !__has_feature(objc_arc)
3334
#error "This file requires ARC support."
@@ -294,7 +295,7 @@ - (void)viewDidLoad {
294295
constant:-16.0],
295296
[_field.heightAnchor constraintEqualToConstant:32.0],
296297
]];
297-
UIView* web_contents_view = _shell->web_contents()->GetNativeView();
298+
UIView* web_contents_view = _shell->web_contents()->GetNativeView().Get();
298299
[_contentView addSubview:web_contents_view];
299300
}
300301

@@ -560,7 +561,7 @@ - (BOOL)isTracing {
560561
DCHECK(base::Contains(shell_data_map_, shell));
561562
ShellData& shell_data = shell_data_map_[shell];
562563

563-
return shell_data.window;
564+
return gfx::NativeWindow(shell_data.window);
564565
}
565566

566567
void ShellPlatformDelegate::CleanUp(Shell* shell) {

0 commit comments

Comments
 (0)