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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 159046: Implementing accelerators for Linux toolkit_views (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #include "chrome/installer/util/helper.h" 100 #include "chrome/installer/util/helper.h"
101 #include "chrome/installer/util/install_util.h" 101 #include "chrome/installer/util/install_util.h"
102 #include "chrome/installer/util/shell_util.h" 102 #include "chrome/installer/util/shell_util.h"
103 #include "chrome/installer/util/version.h" 103 #include "chrome/installer/util/version.h"
104 #include "net/base/net_util.h" 104 #include "net/base/net_util.h"
105 #include "net/base/sdch_manager.h" 105 #include "net/base/sdch_manager.h"
106 #include "net/base/winsock_init.h" 106 #include "net/base/winsock_init.h"
107 #include "net/http/http_network_layer.h" 107 #include "net/http/http_network_layer.h"
108 #include "printing/printed_document.h" 108 #include "printing/printed_document.h"
109 #include "sandbox/src/sandbox.h" 109 #include "sandbox/src/sandbox.h"
110 #include "views/widget/accelerator_handler.h"
111 #endif // defined(OS_WIN) 110 #endif // defined(OS_WIN)
112 111
113 #if defined(TOOLKIT_GTK) 112 #if defined(TOOLKIT_GTK)
114 #include "chrome/common/gtk_util.h" 113 #include "chrome/common/gtk_util.h"
115 #elif defined(TOOLKIT_VIEWS) 114 #elif defined(TOOLKIT_VIEWS)
116 #include "chrome/browser/views/chrome_views_delegate.h" 115 #include "chrome/browser/views/chrome_views_delegate.h"
116 #include "views/focus/accelerator_handler.h"
117 #endif 117 #endif
118 118
119 namespace Platform { 119 namespace Platform {
120 120
121 void WillInitializeMainMessageLoop(const CommandLine & command_line); 121 void WillInitializeMainMessageLoop(const CommandLine & command_line);
122 void WillTerminate(); 122 void WillTerminate();
123 123
124 #if defined(OS_WIN) || defined(OS_LINUX) 124 #if defined(OS_WIN) || defined(OS_LINUX)
125 // Perform any platform-specific work that needs to be done before the main 125 // Perform any platform-specific work that needs to be done before the main
126 // message loop is created and initialized. 126 // message loop is created and initialized.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // This is called indirectly by the network layer to access resources. 185 // This is called indirectly by the network layer to access resources.
186 StringPiece NetResourceProvider(int key) { 186 StringPiece NetResourceProvider(int key) {
187 if (IDR_DIR_HEADER_HTML == key) 187 if (IDR_DIR_HEADER_HTML == key)
188 return StringPiece(lazy_dir_lister.Pointer()->html_data); 188 return StringPiece(lazy_dir_lister.Pointer()->html_data);
189 189
190 return ResourceBundle::GetSharedInstance().GetRawDataResource(key); 190 return ResourceBundle::GetSharedInstance().GetRawDataResource(key);
191 } 191 }
192 192
193 void RunUIMessageLoop(BrowserProcess* browser_process) { 193 void RunUIMessageLoop(BrowserProcess* browser_process) {
194 #if defined(OS_WIN) 194 #if defined(TOOLKIT_VIEWS)
195 views::AcceleratorHandler accelerator_handler; 195 views::AcceleratorHandler accelerator_handler;
196 MessageLoopForUI::current()->Run(&accelerator_handler); 196 MessageLoopForUI::current()->Run(&accelerator_handler);
197 #elif defined(OS_LINUX)
198 MessageLoopForUI::current()->Run(NULL);
197 #elif defined(OS_POSIX) 199 #elif defined(OS_POSIX)
198 MessageLoopForUI::current()->Run(); 200 MessageLoopForUI::current()->Run();
199 #endif 201 #endif
200 } 202 }
201 203
202 #if defined(OS_POSIX) 204 #if defined(OS_POSIX)
203 // See comment below, where sigaction is called. 205 // See comment below, where sigaction is called.
204 void SIGCHLDHandler(int signal) { 206 void SIGCHLDHandler(int signal) {
205 } 207 }
206 208
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 if (metrics) 795 if (metrics)
794 metrics->Stop(); 796 metrics->Stop();
795 797
796 // browser_shutdown takes care of deleting browser_process, so we need to 798 // browser_shutdown takes care of deleting browser_process, so we need to
797 // release it. 799 // release it.
798 browser_process.release(); 800 browser_process.release();
799 browser_shutdown::Shutdown(); 801 browser_shutdown::Shutdown();
800 802
801 return result_code; 803 return result_code;
802 } 804 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/browser_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698