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

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 11471040: [Android WebView] Convert context menu callback to long press (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forward declare Created 8 years 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 | « android_webview/lib/main/aw_main_delegate.h ('k') | android_webview/native/aw_contents.h » ('j') | 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 "android_webview/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include "android_webview/browser/aw_content_browser_client.h" 7 #include "android_webview/browser/aw_content_browser_client.h"
8 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" 8 #include "android_webview/lib/aw_browser_dependency_factory_impl.h"
9 #include "android_webview/native/aw_web_contents_view_delegate.h"
9 #include "android_webview/renderer/aw_content_renderer_client.h" 10 #include "android_webview/renderer/aw_content_renderer_client.h"
10 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "content/public/browser/browser_main_runner.h" 14 #include "content/public/browser/browser_main_runner.h"
14 15
15 namespace android_webview { 16 namespace android_webview {
16 17
17 base::LazyInstance<AwContentBrowserClient>
18 g_webview_content_browser_client = LAZY_INSTANCE_INITIALIZER;
19 base::LazyInstance<AwContentRendererClient> 18 base::LazyInstance<AwContentRendererClient>
20 g_webview_content_renderer_client = LAZY_INSTANCE_INITIALIZER; 19 g_webview_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
21 20
22 AwMainDelegate::AwMainDelegate() { 21 AwMainDelegate::AwMainDelegate() {
23 } 22 }
24 23
25 AwMainDelegate::~AwMainDelegate() { 24 AwMainDelegate::~AwMainDelegate() {
26 } 25 }
27 26
28 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { 27 bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
(...skipping 30 matching lines...) Expand all
59 } 58 }
60 59
61 void AwMainDelegate::ProcessExiting(const std::string& process_type) { 60 void AwMainDelegate::ProcessExiting(const std::string& process_type) {
62 // TODO(torne): Clean up resources when we handle them. 61 // TODO(torne): Clean up resources when we handle them.
63 62
64 logging::CloseLogFile(); 63 logging::CloseLogFile();
65 } 64 }
66 65
67 content::ContentBrowserClient* 66 content::ContentBrowserClient*
68 AwMainDelegate::CreateContentBrowserClient() { 67 AwMainDelegate::CreateContentBrowserClient() {
69 return &g_webview_content_browser_client.Get(); 68 content_browser_client_.reset(
69 new AwContentBrowserClient(&AwWebContentsViewDelegate::Create));
70
71 return content_browser_client_.get();
70 } 72 }
71 73
72 content::ContentRendererClient* 74 content::ContentRendererClient*
73 AwMainDelegate::CreateContentRendererClient() { 75 AwMainDelegate::CreateContentRendererClient() {
74 return &g_webview_content_renderer_client.Get(); 76 content_renderer_client_.reset(new AwContentRendererClient());
77 return content_renderer_client_.get();
75 } 78 }
76 79
77 } // namespace android_webview 80 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.h ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698