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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
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/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/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser_window_state.h" 15 #include "chrome/browser/ui/browser_window_state.h"
16 #include "chrome/common/chrome_version_info.h" 16 #include "components/version_info/version_info.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/context_factory.h" 18 #include "content/public/browser/context_factory.h"
19 #include "grit/chrome_unscaled_resources.h" 19 #include "grit/chrome_unscaled_resources.h"
20 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/base/ui_base_switches.h" 21 #include "ui/base/ui_base_switches.h"
22 #include "ui/gfx/geometry/rect.h" 22 #include "ui/gfx/geometry/rect.h"
23 #include "ui/gfx/screen.h" 23 #include "ui/gfx/screen.h"
24 #include "ui/views/widget/native_widget.h" 24 #include "ui/views/widget/native_widget.h"
25 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
26 26
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 views::LinuxUI* ui = views::LinuxUI::instance(); 380 views::LinuxUI* ui = views::LinuxUI::instance();
381 return maximized && ui && ui->UnityIsRunning(); 381 return maximized && ui && ui->UnityIsRunning();
382 } 382 }
383 #endif 383 #endif
384 384
385 ui::ContextFactory* ChromeViewsDelegate::GetContextFactory() { 385 ui::ContextFactory* ChromeViewsDelegate::GetContextFactory() {
386 return content::GetContextFactory(); 386 return content::GetContextFactory();
387 } 387 }
388 388
389 std::string ChromeViewsDelegate::GetApplicationName() { 389 std::string ChromeViewsDelegate::GetApplicationName() {
390 return chrome::VersionInfo().Name(); 390 return version_info::GetProductName();
391 } 391 }
392 392
393 #if defined(OS_WIN) 393 #if defined(OS_WIN)
394 int ChromeViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor, 394 int ChromeViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor,
395 const base::Closure& callback) { 395 const base::Closure& callback) {
396 // Initialize the map with EDGE_BOTTOM. This is important, as if we return an 396 // Initialize the map with EDGE_BOTTOM. This is important, as if we return an
397 // initial value of 0 (no auto-hide edges) then we'll go fullscreen and 397 // initial value of 0 (no auto-hide edges) then we'll go fullscreen and
398 // windows will automatically remove WS_EX_TOPMOST from the appbar resulting 398 // windows will automatically remove WS_EX_TOPMOST from the appbar resulting
399 // in us thinking there is no auto-hide edges. By returning at least one edge 399 // in us thinking there is no auto-hide edges. By returning at least one edge
400 // we don't initially go fullscreen until we figure out the real auto-hide 400 // we don't initially go fullscreen until we figure out the real auto-hide
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return content::BrowserThread::GetBlockingPool(); 435 return content::BrowserThread::GetBlockingPool();
436 } 436 }
437 437
438 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) 438 #if !defined(USE_AURA) && !defined(USE_CHROMEOS)
439 views::Widget::InitParams::WindowOpacity 439 views::Widget::InitParams::WindowOpacity
440 ChromeViewsDelegate::GetOpacityForInitParams( 440 ChromeViewsDelegate::GetOpacityForInitParams(
441 const views::Widget::InitParams& params) { 441 const views::Widget::InitParams& params) {
442 return views::Widget::InitParams::OPAQUE_WINDOW; 442 return views::Widget::InitParams::OPAQUE_WINDOW;
443 } 443 }
444 #endif 444 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698