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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 7206055: Add an option to run Chrome in the views desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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/ui/views/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 26 matching lines...) Expand all
37 window->GetNativeWindowProperty(Profile::kProfileKey)); 37 window->GetNativeWindowProperty(Profile::kProfileKey));
38 if (!profile) { 38 if (!profile) {
39 // Use local state for windows that have no explicit profile. 39 // Use local state for windows that have no explicit profile.
40 return g_browser_process->local_state(); 40 return g_browser_process->local_state();
41 } 41 }
42 return profile->GetPrefs(); 42 return profile->GetPrefs();
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 // static
48 views::View* ChromeViewsDelegate::default_parent_view = NULL;
49
47 /////////////////////////////////////////////////////////////////////////////// 50 ///////////////////////////////////////////////////////////////////////////////
48 // ChromeViewsDelegate, views::ViewsDelegate implementation: 51 // ChromeViewsDelegate, views::ViewsDelegate implementation:
49 52
50 ui::Clipboard* ChromeViewsDelegate::GetClipboard() const { 53 ui::Clipboard* ChromeViewsDelegate::GetClipboard() const {
51 return g_browser_process->clipboard(); 54 return g_browser_process->clipboard();
52 } 55 }
53 56
54 views::View* ChromeViewsDelegate::GetDefaultParentView() { 57 views::View* ChromeViewsDelegate::GetDefaultParentView() {
55 return NULL; 58 return default_parent_view;
56 } 59 }
57 60
58 void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window, 61 void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window,
59 const std::wstring& window_name, 62 const std::wstring& window_name,
60 const gfx::Rect& bounds, 63 const gfx::Rect& bounds,
61 bool maximized) { 64 bool maximized) {
62 PrefService* prefs = GetPrefsForWindow(window); 65 PrefService* prefs = GetPrefsForWindow(window);
63 if (!prefs) 66 if (!prefs)
64 return; 67 return;
65 68
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 g_browser_process->AddRefModule(); 148 g_browser_process->AddRefModule();
146 } 149 }
147 150
148 void ChromeViewsDelegate::ReleaseRef() { 151 void ChromeViewsDelegate::ReleaseRef() {
149 g_browser_process->ReleaseModule(); 152 g_browser_process->ReleaseModule();
150 } 153 }
151 154
152 int ChromeViewsDelegate::GetDispositionForEvent(int event_flags) { 155 int ChromeViewsDelegate::GetDispositionForEvent(int event_flags) {
153 return event_utils::DispositionFromEventFlags(event_flags); 156 return event_utils::DispositionFromEventFlags(event_flags);
154 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | chrome/browser/ui/views/frame/browser_frame_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698