Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: ui/views/examples/webview_example.cc

Issue 10383034: views/examples: Clean up cpplint warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/examples/tree_view_example.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/examples/webview_example.h" 5 #include "ui/views/examples/webview_example.h"
6 6
7 #include "base/utf_string_conversions.h"
8 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/navigation_controller.h" 8 #include "ui/views/controls/webview/webview.h"
10 #include "grit/ui_resources.h"
11 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/views/layout/fill_layout.h" 9 #include "ui/views/layout/fill_layout.h"
13 #include "ui/views/controls/webview/webview.h"
14 10
15 namespace views { 11 namespace views {
16 namespace examples { 12 namespace examples {
17 13
18 WebViewExample::WebViewExample(content::BrowserContext* browser_context) 14 WebViewExample::WebViewExample(content::BrowserContext* browser_context)
19 : ExampleBase("WebView"), 15 : ExampleBase("WebView"),
20 webview_(NULL), 16 webview_(NULL),
21 browser_context_(browser_context) { 17 browser_context_(browser_context) {
22 } 18 }
23 19
24 WebViewExample::~WebViewExample() { 20 WebViewExample::~WebViewExample() {
25 } 21 }
26 22
27 void WebViewExample::CreateExampleView(View* container) { 23 void WebViewExample::CreateExampleView(View* container) {
28 webview_ = new WebView(browser_context_); 24 webview_ = new WebView(browser_context_);
29 container->SetLayoutManager(new FillLayout); 25 container->SetLayoutManager(new FillLayout);
30 container->AddChildView(webview_); 26 container->AddChildView(webview_);
31 27
32 webview_->LoadInitialURL(GURL("http://www.google.com/")); 28 webview_->LoadInitialURL(GURL("http://www.google.com/"));
33 webview_->web_contents()->Focus(); 29 webview_->web_contents()->Focus();
34 } 30 }
35 31
36 } // namespace examples 32 } // namespace examples
37 } // namespace views 33 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/tree_view_example.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698