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

Side by Side Diff: content/browser/renderer_host/legacy_render_widget_host_win.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 "content/browser/renderer_host/legacy_render_widget_host_win.h" 5 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "content/browser/renderer_host/legacy_render_widget_host_win_delegate.h " 10 #include "content/browser/renderer_host/legacy_render_widget_host_win_delegate.h "
(...skipping 21 matching lines...) Expand all
32 32
33 LegacyRenderWidgetHostHWND::~LegacyRenderWidgetHostHWND() { 33 LegacyRenderWidgetHostHWND::~LegacyRenderWidgetHostHWND() {
34 if (::IsWindow(hwnd())) 34 if (::IsWindow(hwnd()))
35 ::DestroyWindow(hwnd()); 35 ::DestroyWindow(hwnd());
36 } 36 }
37 37
38 // static 38 // static
39 LegacyRenderWidgetHostHWND* LegacyRenderWidgetHostHWND::Create( 39 LegacyRenderWidgetHostHWND* LegacyRenderWidgetHostHWND::Create(
40 HWND parent, 40 HWND parent,
41 LegacyRenderWidgetHostHWNDDelegate* delegate) { 41 LegacyRenderWidgetHostHWNDDelegate* delegate) {
42 if (CommandLine::ForCurrentProcess()->HasSwitch( 42 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
43 switches::kDisableLegacyIntermediateWindow)) { 43 switches::kDisableLegacyIntermediateWindow)) {
44 return nullptr; 44 return nullptr;
45 } 45 }
46 46
47 LegacyRenderWidgetHostHWND* legacy_window_instance = 47 LegacyRenderWidgetHostHWND* legacy_window_instance =
48 new LegacyRenderWidgetHostHWND(parent, delegate); 48 new LegacyRenderWidgetHostHWND(parent, delegate);
49 // If we failed to create the child, return NULL. 49 // If we failed to create the child, return NULL.
50 if (!::IsWindow(legacy_window_instance->hwnd())) { 50 if (!::IsWindow(legacy_window_instance->hwnd())) {
51 delete legacy_window_instance; 51 delete legacy_window_instance;
52 return nullptr; 52 return nullptr;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // generate the legacy WM_VSCROLL/WM_HSCROLL messages. 366 // generate the legacy WM_VSCROLL/WM_HSCROLL messages.
367 // We add these styles to ensure that trackpad/trackpoint scrolling 367 // We add these styles to ensure that trackpad/trackpoint scrolling
368 // work. 368 // work.
369 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE); 369 long current_style = ::GetWindowLong(hwnd(), GWL_STYLE);
370 ::SetWindowLong(hwnd(), GWL_STYLE, 370 ::SetWindowLong(hwnd(), GWL_STYLE,
371 current_style | WS_VSCROLL | WS_HSCROLL); 371 current_style | WS_VSCROLL | WS_HSCROLL);
372 return 0; 372 return 0;
373 } 373 }
374 374
375 } // namespace content 375 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698