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

Side by Side Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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 | « no previous file | android_webview/browser/aw_content_browser_client.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/browser/aw_browser_main_parts.h" 5 #include "android_webview/browser/aw_browser_main_parts.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_devtools_delegate.h" 8 #include "android_webview/browser/aw_devtools_delegate.h"
9 #include "android_webview/browser/aw_result_codes.h" 9 #include "android_webview/browser/aw_result_codes.h"
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
11 #include "base/android/locale_utils.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/path_service.h" 13 #include "base/path_service.h"
13 #include "content/public/browser/android/compositor.h" 14 #include "content/public/browser/android/compositor.h"
14 #include "content/public/browser/content_browser_client.h"
15 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
16 #include "content/public/common/content_client.h" 16 #include "content/public/common/content_client.h"
17 #include "content/public/common/result_codes.h" 17 #include "content/public/common/result_codes.h"
18 #include "net/android/network_change_notifier_factory_android.h" 18 #include "net/android/network_change_notifier_factory_android.h"
19 #include "net/base/network_change_notifier.h" 19 #include "net/base/network_change_notifier.h"
20 #include "ui/base/layout.h" 20 #include "ui/base/layout.h"
21 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
22 #include "ui/base/ui_base_paths.h" 22 #include "ui/base/ui_base_paths.h"
23 23
24 namespace android_webview { 24 namespace android_webview {
(...skipping 19 matching lines...) Expand all
44 // Android specific MessageLoop. Also see MainMessageLoopRun. 44 // Android specific MessageLoop. Also see MainMessageLoopRun.
45 DCHECK(!main_message_loop_.get()); 45 DCHECK(!main_message_loop_.get());
46 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); 46 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
47 MessageLoopForUI::current()->Start(); 47 MessageLoopForUI::current()->Start();
48 } 48 }
49 49
50 int AwBrowserMainParts::PreCreateThreads() { 50 int AwBrowserMainParts::PreCreateThreads() {
51 browser_context_->InitializeBeforeThreadCreation(); 51 browser_context_->InitializeBeforeThreadCreation();
52 52
53 ui::ResourceBundle::InitSharedInstanceLocaleOnly( 53 ui::ResourceBundle::InitSharedInstanceLocaleOnly(
54 content::GetContentClient()->browser()->GetApplicationLocale(), NULL); 54 base::android::GetDefaultLocale(), NULL);
55 55
56 base::FilePath pak_path; 56 base::FilePath pak_path;
57 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_path); 57 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_path);
58 58
59 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( 59 ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
60 pak_path.AppendASCII("webviewchromium.pak"), 60 pak_path.AppendASCII("webviewchromium.pak"),
61 ui::SCALE_FACTOR_NONE); 61 ui::SCALE_FACTOR_NONE);
62 62
63 return content::RESULT_CODE_NORMAL_EXIT; 63 return content::RESULT_CODE_NORMAL_EXIT;
64 } 64 }
65 65
66 void AwBrowserMainParts::PreMainMessageLoopRun() { 66 void AwBrowserMainParts::PreMainMessageLoopRun() {
67 browser_context_->PreMainMessageLoopRun(); 67 browser_context_->PreMainMessageLoopRun();
68 devtools_delegate_ = new AwDevToolsDelegate(browser_context_); 68 devtools_delegate_ = new AwDevToolsDelegate(browser_context_);
69 } 69 }
70 70
71 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 71 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
72 // Android WebView does not use default MessageLoop. It has its own 72 // Android WebView does not use default MessageLoop. It has its own
73 // Android specific MessageLoop. 73 // Android specific MessageLoop.
74 return true; 74 return true;
75 } 75 }
76 76
77 void AwBrowserMainParts::PostMainMessageLoopRun() { 77 void AwBrowserMainParts::PostMainMessageLoopRun() {
78 if (devtools_delegate_) 78 if (devtools_delegate_)
79 devtools_delegate_->Stop(); 79 devtools_delegate_->Stop();
80 } 80 }
81 81
82 } // namespace android_webview 82 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698