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

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

Issue 659233002: STASH: Epic Experimental patch for toolkit-views App List on Mac Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Fix a few things. Works@master Created 6 years, 2 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 web_contents_->GetBrowserContext()); 103 web_contents_->GetBrowserContext());
104 web_view->SetPreferredSize(size); 104 web_view->SetPreferredSize(size);
105 web_view->SetWebContents(web_contents_.get()); 105 web_view->SetWebContents(web_contents_.get());
106 return web_view; 106 return web_view;
107 } 107 }
108 108
109 void ShowAppList(content::BrowserContext* browser_context, 109 void ShowAppList(content::BrowserContext* browser_context,
110 gfx::NativeWindow window_context) { 110 gfx::NativeWindow window_context) {
111 DemoAppListViewDelegate* delegate = 111 DemoAppListViewDelegate* delegate =
112 new DemoAppListViewDelegate(browser_context); 112 new DemoAppListViewDelegate(browser_context);
113 app_list::AppListView* view = delegate->InitView(window_context); 113 app_list::AppListView* view = delegate->InitView(NULL);
114 view->GetWidget()->Show(); 114 view->GetWidget()->Show();
115 view->GetWidget()->Activate(); 115 view->GetWidget()->Activate();
116 } 116 }
117 117
118 } // namespace 118 } // namespace
119 119
120 #if defined(OS_WIN) 120 #if defined(OS_WIN)
121 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { 121 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
122 sandbox::SandboxInterfaceInfo sandbox_info = {0}; 122 sandbox::SandboxInterfaceInfo sandbox_info = {0};
123 content::InitializeSandboxInfo(&sandbox_info); 123 content::InitializeSandboxInfo(&sandbox_info);
124 ui::ViewsContentClient views_content_client(instance, &sandbox_info); 124 ui::ViewsContentClient views_content_client(instance, &sandbox_info);
125 #else 125 #else
126 int main(int argc, const char** argv) { 126 int main(int argc, const char** argv) {
127 ui::ViewsContentClient views_content_client(argc, argv); 127 ui::ViewsContentClient views_content_client(argc, argv);
128 #endif 128 #endif
129 129
130 views_content_client.set_task(base::Bind(&ShowAppList)); 130 views_content_client.set_task(base::Bind(&ShowAppList));
131 return views_content_client.RunMain(); 131 return views_content_client.RunMain();
132 } 132 }
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/cast_auth_util_openssl.cc ('k') | ui/app_list/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698