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

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

Issue 10945037: Remove unused field from WebContentsViewAura and add comment as to why (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | 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 (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/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/browser/renderer_host/dip_util.h" 8 #include "content/browser/renderer_host/dip_util.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/web_contents/interstitial_page_impl.h" 10 #include "content/browser/web_contents/interstitial_page_impl.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 aura::Window* window = rvh->GetView()->GetNativeView(); 244 aura::Window* window = rvh->GetView()->GetNativeView();
245 aura::Window::ConvertPointToTarget(root_window, window, &client_loc); 245 aura::Window::ConvertPointToTarget(root_window, window, &client_loc);
246 rvh->DragSourceEndedAt(client_loc.x(), client_loc.y(), screen_loc.x(), 246 rvh->DragSourceEndedAt(client_loc.x(), client_loc.y(), screen_loc.x(),
247 screen_loc.y(), ops); 247 screen_loc.y(), ops);
248 } 248 }
249 249
250 //////////////////////////////////////////////////////////////////////////////// 250 ////////////////////////////////////////////////////////////////////////////////
251 // WebContentsViewAura, WebContentsView implementation: 251 // WebContentsViewAura, WebContentsView implementation:
252 252
253 void WebContentsViewAura::CreateView(const gfx::Size& initial_size) { 253 void WebContentsViewAura::CreateView(const gfx::Size& initial_size) {
254 initial_size_ = initial_size; 254 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as
255 // if the bookmark bar is not shown and you create a new tab). The right
256 // value is set shortly after this, so its safe to ignore.
255 257
256 window_.reset(new aura::Window(this)); 258 window_.reset(new aura::Window(this));
257 window_->set_owned_by_parent(false); 259 window_->set_owned_by_parent(false);
258 window_->SetType(aura::client::WINDOW_TYPE_CONTROL); 260 window_->SetType(aura::client::WINDOW_TYPE_CONTROL);
259 window_->SetTransparent(false); 261 window_->SetTransparent(false);
260 window_->Init(ui::LAYER_NOT_DRAWN); 262 window_->Init(ui::LAYER_NOT_DRAWN);
261 window_->SetParent(NULL); 263 window_->SetParent(NULL);
262 window_->layer()->SetMasksToBounds(true); 264 window_->layer()->SetMasksToBounds(true);
263 window_->SetName("WebContentsViewAura"); 265 window_->SetName("WebContentsViewAura");
264 266
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 OnDragEntered(event); 658 OnDragEntered(event);
657 659
658 web_contents_->GetRenderViewHost()->DragTargetDrop( 660 web_contents_->GetRenderViewHost()->DragTargetDrop(
659 event.location(), 661 event.location(),
660 gfx::Screen::GetCursorScreenPoint(), 662 gfx::Screen::GetCursorScreenPoint(),
661 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 663 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
662 if (drag_dest_delegate_) 664 if (drag_dest_delegate_)
663 drag_dest_delegate_->OnDrop(); 665 drag_dest_delegate_->OnDrop();
664 return current_drag_op_; 666 return current_drag_op_;
665 } 667 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698