| Index: ui/views/examples/webview_example.cc
|
| diff --git a/ui/views/examples/webview_example.cc b/ui/views/examples/webview_example.cc
|
| index feae6b977f98b0bb7349932e551c37a5fbe309a1..ccde6d7e8b50b3a76d841f4b769cde61920ec13b 100644
|
| --- a/ui/views/examples/webview_example.cc
|
| +++ b/ui/views/examples/webview_example.cc
|
| @@ -23,11 +23,19 @@ WebViewExample::~WebViewExample() {
|
|
|
| void WebViewExample::CreateExampleView(View* container) {
|
| webview_ = new WebView(browser_context_);
|
| + webview_->GetWebContents()->SetDelegate(this);
|
| container->SetLayoutManager(new FillLayout);
|
| container->AddChildView(webview_);
|
|
|
| webview_->LoadInitialURL(GURL("http://www.google.com/"));
|
| - webview_->web_contents()->Focus();
|
| + webview_->GetWebContents()->Focus();
|
| +}
|
| +
|
| +void WebViewExample::HandleKeyboardEvent(
|
| + content::WebContents* source,
|
| + const content::NativeWebKeyboardEvent& event) {
|
| + unhandled_keyboard_event_handler_.HandleKeyboardEvent(
|
| + event, webview_->GetFocusManager());
|
| }
|
|
|
| } // namespace examples
|
|
|