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

Side by Side Diff: ui/app_list/demo/app_list_demo_views.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/single_thread_task_runner.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
15 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
16 #include "ui/app_list/test/app_list_test_model.h" 17 #include "ui/app_list/test/app_list_test_model.h"
17 #include "ui/app_list/test/app_list_test_view_delegate.h" 18 #include "ui/app_list/test/app_list_test_view_delegate.h"
18 #include "ui/app_list/views/app_list_view.h" 19 #include "ui/app_list/views/app_list_view.h"
19 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/resources/grit/ui_resources.h" 21 #include "ui/resources/grit/ui_resources.h"
21 #include "ui/views/controls/webview/webview.h" 22 #include "ui/views/controls/webview/webview.h"
22 #include "ui/views_content_client/views_content_client.h" 23 #include "ui/views_content_client/views_content_client.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 86 }
86 return view_; 87 return view_;
87 } 88 }
88 89
89 void DemoAppListViewDelegate::Dismiss() { 90 void DemoAppListViewDelegate::Dismiss() {
90 view_->GetWidget()->Close(); 91 view_->GetWidget()->Close();
91 } 92 }
92 93
93 void DemoAppListViewDelegate::ViewClosing() { 94 void DemoAppListViewDelegate::ViewClosing() {
94 base::MessageLoop* message_loop = base::MessageLoopForUI::current(); 95 base::MessageLoop* message_loop = base::MessageLoopForUI::current();
95 message_loop->DeleteSoon(FROM_HERE, this); 96 message_loop->task_runner()->DeleteSoon(FROM_HERE, this);
96 message_loop->QuitWhenIdle(); 97 message_loop->QuitWhenIdle();
97 } 98 }
98 99
99 views::View* DemoAppListViewDelegate::CreateStartPageWebView( 100 views::View* DemoAppListViewDelegate::CreateStartPageWebView(
100 const gfx::Size& size) { 101 const gfx::Size& size) {
101 web_contents_.reset(content::WebContents::Create( 102 web_contents_.reset(content::WebContents::Create(
102 content::WebContents::CreateParams(browser_context_))); 103 content::WebContents::CreateParams(browser_context_)));
103 web_contents_->GetController().LoadURL(GURL("http://www.google.com/"), 104 web_contents_->GetController().LoadURL(GURL("http://www.google.com/"),
104 content::Referrer(), 105 content::Referrer(),
105 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, 106 ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
(...skipping 22 matching lines...) Expand all
128 content::InitializeSandboxInfo(&sandbox_info); 129 content::InitializeSandboxInfo(&sandbox_info);
129 ui::ViewsContentClient views_content_client(instance, &sandbox_info); 130 ui::ViewsContentClient views_content_client(instance, &sandbox_info);
130 #else 131 #else
131 int main(int argc, const char** argv) { 132 int main(int argc, const char** argv) {
132 ui::ViewsContentClient views_content_client(argc, argv); 133 ui::ViewsContentClient views_content_client(argc, argv);
133 #endif 134 #endif
134 135
135 views_content_client.set_task(base::Bind(&ShowAppList)); 136 views_content_client.set_task(base::Bind(&ShowAppList));
136 return views_content_client.RunMain(); 137 return views_content_client.RunMain();
137 } 138 }
OLDNEW
« no previous file with comments | « services/navigation/content_client/browser_main_parts.cc ('k') | ui/app_list/pagination_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698