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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 262883011: Makes PlatformEventSource creation in Env conditional (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1036
1037 //////////////////////////////////////////////////////////////////////////////// 1037 ////////////////////////////////////////////////////////////////////////////////
1038 // WebContentsViewAura, WebContentsViewPort implementation: 1038 // WebContentsViewAura, WebContentsViewPort implementation:
1039 1039
1040 void WebContentsViewAura::CreateView( 1040 void WebContentsViewAura::CreateView(
1041 const gfx::Size& initial_size, gfx::NativeView context) { 1041 const gfx::Size& initial_size, gfx::NativeView context) {
1042 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as 1042 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as
1043 // if the bookmark bar is not shown and you create a new tab). The right 1043 // if the bookmark bar is not shown and you create a new tab). The right
1044 // value is set shortly after this, so its safe to ignore. 1044 // value is set shortly after this, so its safe to ignore.
1045 1045
1046 aura::Env::CreateInstance(); 1046 aura::Env::CreateInstance(true);
1047 window_.reset(new aura::Window(this)); 1047 window_.reset(new aura::Window(this));
1048 window_->set_owned_by_parent(false); 1048 window_->set_owned_by_parent(false);
1049 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL); 1049 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL);
1050 window_->SetTransparent(false); 1050 window_->SetTransparent(false);
1051 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 1051 window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
1052 aura::Window* root_window = context ? context->GetRootWindow() : NULL; 1052 aura::Window* root_window = context ? context->GetRootWindow() : NULL;
1053 if (root_window) { 1053 if (root_window) {
1054 // There are places where there is no context currently because object 1054 // There are places where there is no context currently because object
1055 // hierarchies are built before they're attached to a Widget. (See 1055 // hierarchies are built before they're attached to a Widget. (See
1056 // views::WebView as an example; GetWidget() returns NULL at the point 1056 // views::WebView as an example; GetWidget() returns NULL at the point
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 event.location(), 1536 event.location(),
1537 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1537 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1538 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1538 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1539 if (drag_dest_delegate_) 1539 if (drag_dest_delegate_)
1540 drag_dest_delegate_->OnDrop(); 1540 drag_dest_delegate_->OnDrop();
1541 current_drop_data_.reset(); 1541 current_drop_data_.reset();
1542 return ConvertFromWeb(current_drag_op_); 1542 return ConvertFromWeb(current_drag_op_);
1543 } 1543 }
1544 1544
1545 } // namespace content 1545 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_unittest.cc ('k') | mojo/examples/aura_demo/aura_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698