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

Side by Side Diff: chrome/browser/ui/views/frame/browser_window_factory.cc

Issue 2714063003: views: don't try to SetProperty on NSWindows (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/views/frame/browser_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 #include "chrome/browser/ui/views/frame/browser_view.h" 6 #include "chrome/browser/ui/views/frame/browser_view.h"
7 #include "chrome/browser/ui/views/frame/native_browser_frame_factory.h" 7 #include "chrome/browser/ui/views/frame/native_browser_frame_factory.h"
8 #include "chrome/grit/chromium_strings.h" 8 #include "chrome/grit/chromium_strings.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 // static 14 // static
15 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser, 15 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser,
16 bool user_gesture) { 16 bool user_gesture) {
17 // Create the view and the frame. The frame will attach itself via the view 17 // Create the view and the frame. The frame will attach itself via the view
18 // so we don't need to do anything with the pointer. 18 // so we don't need to do anything with the pointer.
19 BrowserView* view = new BrowserView(); 19 BrowserView* view = new BrowserView();
20 view->Init(browser); 20 view->Init(browser);
21 (new BrowserFrame(view))->InitBrowserFrame(); 21 (new BrowserFrame(view))->InitBrowserFrame();
22 view->GetWidget()->non_client_view()->SetAccessibleName( 22 view->GetWidget()->non_client_view()->SetAccessibleName(
23 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 23 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
24 // For now, all browser windows are true. 24
25 #if defined(USE_AURA)
26 // For now, all browser windows are true. This only works when USE_AURA
27 // because it requires gfx::NativeWindow to be an aura::Window*.
25 view->GetWidget()->GetNativeWindow()->SetProperty( 28 view->GetWidget()->GetNativeWindow()->SetProperty(
sky 2017/02/24 18:35:16 An alternative is to call view->GetWidget()->SetNa
26 aura::client::kCreatedByUserGesture, user_gesture); 29 aura::client::kCreatedByUserGesture, user_gesture);
30 #endif
27 return view; 31 return view;
28 } 32 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698