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

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: Joth's comments. 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
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"
8 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" 7 #include "android_webview/lib/aw_browser_dependency_factory_impl.h"
9 #include "android_webview/renderer/aw_content_renderer_client.h" 8 #include "android_webview/native/aw_web_contents_view_delegate.h"
10 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
11 #include "base/logging.h" 10 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
13 #include "content/public/browser/browser_main_runner.h" 12 #include "content/public/browser/browser_main_runner.h"
14 13
15 namespace android_webview { 14 namespace android_webview {
16 15
17 base::LazyInstance<AwContentBrowserClient>
18 g_webview_content_browser_client = LAZY_INSTANCE_INITIALIZER;
19 base::LazyInstance<AwContentRendererClient> 16 base::LazyInstance<AwContentRendererClient>
20 g_webview_content_renderer_client = LAZY_INSTANCE_INITIALIZER; 17 g_webview_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
21 18
22 AwMainDelegate::AwMainDelegate() { 19 AwMainDelegate::AwMainDelegate() {
23 } 20 }
24 21
25 AwMainDelegate::~AwMainDelegate() { 22 AwMainDelegate::~AwMainDelegate() {
26 } 23 }
27 24
28 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { 25 bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
(...skipping 30 matching lines...) Expand all
59 } 56 }
60 57
61 void AwMainDelegate::ProcessExiting(const std::string& process_type) { 58 void AwMainDelegate::ProcessExiting(const std::string& process_type) {
62 // TODO(torne): Clean up resources when we handle them. 59 // TODO(torne): Clean up resources when we handle them.
63 60
64 logging::CloseLogFile(); 61 logging::CloseLogFile();
65 } 62 }
66 63
67 content::ContentBrowserClient* 64 content::ContentBrowserClient*
68 AwMainDelegate::CreateContentBrowserClient() { 65 AwMainDelegate::CreateContentBrowserClient() {
69 return &g_webview_content_browser_client.Get(); 66 content_browser_client_.reset(
67 new AwContentBrowserClient(&AwWebContentsViewDelegate::Create));
68
69 return content_browser_client_.get();
70 } 70 }
71 71
72 content::ContentRendererClient* 72 content::ContentRendererClient*
73 AwMainDelegate::CreateContentRendererClient() { 73 AwMainDelegate::CreateContentRendererClient() {
74 return &g_webview_content_renderer_client.Get(); 74 content_renderer_client_.reset(new AwContentRendererClient());
75 return content_renderer_client_.get();
75 } 76 }
76 77
77 } // namespace android_webview 78 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698