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

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

Issue 8566054: Set up desktop in proper location; fix notification initialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_browser_parts_views.h" 5 #include "chrome/browser/chrome_browser_parts_views.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/ui/views/chrome_views_delegate.h" 10 #include "chrome/browser/ui/views/chrome_views_delegate.h"
(...skipping 10 matching lines...) Expand all
21 // display the correct icon. 21 // display the correct icon.
22 if (!views::ViewsDelegate::views_delegate) 22 if (!views::ViewsDelegate::views_delegate)
23 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate; 23 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate;
24 24
25 // TODO(beng): Move to WidgetImpl and implement on Windows too! 25 // TODO(beng): Move to WidgetImpl and implement on Windows too!
26 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDebugViewsPaint)) 26 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDebugViewsPaint))
27 views::Widget::SetDebugPaintEnabled(true); 27 views::Widget::SetDebugPaintEnabled(true);
28 } 28 }
29 29
30 void ChromeBrowserPartsViews::PreMainMessageLoopRun() { 30 void ChromeBrowserPartsViews::PreMainMessageLoopRun() {
31 }
32
33 bool ChromeBrowserPartsViews::MainMessageLoopRun(int* result_code) {
34 return false;
35 }
36
37 // TODO(stevenjb): Move this into a chrome specific stage instead of calling
38 // directly from ChromeBrowserMainParts::PreMainMessageLoopRun().
39 void ChromeBrowserPartsViews::SetupDesktop() {
31 #if !defined(USE_AURA) 40 #if !defined(USE_AURA)
32 views::Widget::SetPureViews( 41 views::Widget::SetPureViews(
33 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); 42 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews));
34 // Launch the views desktop shell window and register it as the default parent 43 // Launch the views desktop shell window and register it as the default parent
35 // for all unparented views widgets. 44 // for all unparented views widgets.
36 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 45 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
37 if (command_line.HasSwitch(switches::kViewsDesktop)) { 46 if (command_line.HasSwitch(switches::kViewsDesktop)) {
38 std::string desktop_type_cmd = 47 std::string desktop_type_cmd =
39 command_line.GetSwitchValueASCII(switches::kViewsDesktop); 48 command_line.GetSwitchValueASCII(switches::kViewsDesktop);
40 if (desktop_type_cmd != "disabled") { 49 if (desktop_type_cmd != "disabled") {
41 views::desktop::DesktopWindowView::DesktopType desktop_type; 50 views::desktop::DesktopWindowView::DesktopType desktop_type;
42 if (desktop_type_cmd == "netbook") 51 if (desktop_type_cmd == "netbook")
43 desktop_type = views::desktop::DesktopWindowView::DESKTOP_NETBOOK; 52 desktop_type = views::desktop::DesktopWindowView::DESKTOP_NETBOOK;
44 else if (desktop_type_cmd == "other") 53 else if (desktop_type_cmd == "other")
45 desktop_type = views::desktop::DesktopWindowView::DESKTOP_OTHER; 54 desktop_type = views::desktop::DesktopWindowView::DESKTOP_OTHER;
46 else 55 else
47 desktop_type = views::desktop::DesktopWindowView::DESKTOP_DEFAULT; 56 desktop_type = views::desktop::DesktopWindowView::DESKTOP_DEFAULT;
48 views::desktop::DesktopWindowView::CreateDesktopWindow(desktop_type); 57 views::desktop::DesktopWindowView::CreateDesktopWindow(desktop_type);
49 ChromeViewsDelegate* chrome_views_delegate = static_cast 58 ChromeViewsDelegate* chrome_views_delegate = static_cast
50 <ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate); 59 <ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate);
51 chrome_views_delegate->default_parent_view = 60 chrome_views_delegate->default_parent_view =
52 views::desktop::DesktopWindowView::desktop_window_view; 61 views::desktop::DesktopWindowView::desktop_window_view;
53 } 62 }
54 } 63 }
55 #endif 64 #endif
56 } 65 }
57
58 bool ChromeBrowserPartsViews::MainMessageLoopRun(int* result_code) {
59 return false;
60 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_parts_views.h ('k') | chrome/browser/notifications/desktop_notification_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698