cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ui / views / examples / webview_example.h
blobf04c87e8403d8c6ddab56b7273d20adca0f98dc1
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_EXAMPLES_WEBVIEW_EXAMPLE_H_
6 #define UI_VIEWS_EXAMPLES_WEBVIEW_EXAMPLE_H_
8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_delegate.h"
10 #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h"
11 #include "ui/views/examples/example_base.h"
13 namespace content {
14 class BrowserContext;
17 namespace views {
18 class WebView;
20 namespace examples {
22 class WebViewExample : public ExampleBase, public content::WebContentsDelegate {
23 public:
24 explicit WebViewExample(content::BrowserContext* browser_context);
25 ~WebViewExample() override;
27 // ExampleBase:
28 void CreateExampleView(View* container) override;
30 // content::WebContentsDelegate:
31 void HandleKeyboardEvent(
32 content::WebContents* source,
33 const content::NativeWebKeyboardEvent& event) override;
35 private:
36 WebView* webview_;
37 content::BrowserContext* browser_context_;
38 views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
40 DISALLOW_COPY_AND_ASSIGN(WebViewExample);
43 } // namespace examples
44 } // namespace views
46 #endif // UI_VIEWS_EXAMPLES_WEBVIEW_EXAMPLE_H_