| OLD | NEW |
| 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/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" |
| 11 #include "chrome/browser/event_disposition.h" | 11 #include "chrome/browser/event_disposition.h" |
| 12 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 13 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 15 #include "chrome/browser/ui/views/accessibility/accessibility_event_router_views
.h" | 15 #include "chrome/browser/ui/views/accessibility/accessibility_event_router_views
.h" |
| 16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 17 #include "ui/base/clipboard/clipboard.h" | |
| 18 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 19 #include "ui/gfx/screen.h" | 18 #include "ui/gfx/screen.h" |
| 20 #include "ui/views/widget/native_widget.h" | 19 #include "ui/views/widget/native_widget.h" |
| 21 #include "ui/views/widget/widget.h" | 20 #include "ui/views/widget/widget.h" |
| 22 | 21 |
| 23 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
| 24 #include "chrome/browser/app_icon_win.h" | 23 #include "chrome/browser/app_icon_win.h" |
| 25 #endif | 24 #endif |
| 26 | 25 |
| 27 #if defined(USE_AURA) | 26 #if defined(USE_AURA) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 return g_browser_process->local_state(); | 48 return g_browser_process->local_state(); |
| 50 } | 49 } |
| 51 return profile->GetPrefs(); | 50 return profile->GetPrefs(); |
| 52 } | 51 } |
| 53 | 52 |
| 54 } // namespace | 53 } // namespace |
| 55 | 54 |
| 56 /////////////////////////////////////////////////////////////////////////////// | 55 /////////////////////////////////////////////////////////////////////////////// |
| 57 // ChromeViewsDelegate, views::ViewsDelegate implementation: | 56 // ChromeViewsDelegate, views::ViewsDelegate implementation: |
| 58 | 57 |
| 59 ui::Clipboard* ChromeViewsDelegate::GetClipboard() const { | |
| 60 return g_browser_process->clipboard(); | |
| 61 } | |
| 62 | |
| 63 void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window, | 58 void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window, |
| 64 const std::string& window_name, | 59 const std::string& window_name, |
| 65 const gfx::Rect& bounds, | 60 const gfx::Rect& bounds, |
| 66 ui::WindowShowState show_state) { | 61 ui::WindowShowState show_state) { |
| 67 PrefService* prefs = GetPrefsForWindow(window); | 62 PrefService* prefs = GetPrefsForWindow(window); |
| 68 if (!prefs) | 63 if (!prefs) |
| 69 return; | 64 return; |
| 70 | 65 |
| 71 DCHECK(prefs->FindPreference(window_name.c_str())); | 66 DCHECK(prefs->FindPreference(window_name.c_str())); |
| 72 DictionaryPrefUpdate update(prefs, window_name.c_str()); | 67 DictionaryPrefUpdate update(prefs, window_name.c_str()); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 return NULL; | 170 return NULL; |
| 176 #endif | 171 #endif |
| 177 } | 172 } |
| 178 #endif | 173 #endif |
| 179 | 174 |
| 180 content::WebContents* ChromeViewsDelegate::CreateWebContents( | 175 content::WebContents* ChromeViewsDelegate::CreateWebContents( |
| 181 content::BrowserContext* browser_context, | 176 content::BrowserContext* browser_context, |
| 182 content::SiteInstance* site_instance) { | 177 content::SiteInstance* site_instance) { |
| 183 return NULL; | 178 return NULL; |
| 184 } | 179 } |
| OLD | NEW |