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

Side by Side Diff: chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.cc

Issue 10443091: Make BrowserMainParts have an empty implementation to make embedding easier. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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) 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 "chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.h" 5 #include "chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/chrome_browser_main.h" 10 #include "chrome/browser/chrome_browser_main.h"
11 #include "chrome/browser/toolkit_extra_parts.h" 11 #include "chrome/browser/toolkit_extra_parts.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "grit/chromium_strings.h" 13 #include "grit/chromium_strings.h"
14 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/gfx/gtk_util.h" 17 #include "ui/gfx/gtk_util.h"
18 18
19 ChromeBrowserMainExtraPartsGtk::ChromeBrowserMainExtraPartsGtk() 19 ChromeBrowserMainExtraPartsGtk::ChromeBrowserMainExtraPartsGtk() {
20 : ChromeBrowserMainExtraParts() {
21 } 20 }
22 21
23 void ChromeBrowserMainExtraPartsGtk::PreEarlyInitialization() { 22 void ChromeBrowserMainExtraPartsGtk::PreEarlyInitialization() {
24 DetectRunningAsRoot(); 23 DetectRunningAsRoot();
25 } 24 }
26 25
27 26
28 void ChromeBrowserMainExtraPartsGtk::DetectRunningAsRoot() { 27 void ChromeBrowserMainExtraPartsGtk::DetectRunningAsRoot() {
29 if (geteuid() == 0) { 28 if (geteuid() == 0) {
30 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 29 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 gtk_widget_destroy(dialog); 80 gtk_widget_destroy(dialog);
82 } 81 }
83 82
84 namespace browser { 83 namespace browser {
85 84
86 void AddGtkToolkitExtraParts(ChromeBrowserMainParts* main_parts) { 85 void AddGtkToolkitExtraParts(ChromeBrowserMainParts* main_parts) {
87 main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk()); 86 main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk());
88 } 87 }
89 88
90 } // namespace browser 89 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698