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

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

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/DEPS » ('j') | 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/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 if (overscroll_window_) { 955 if (overscroll_window_) {
956 base::AutoReset<OverscrollMode> reset_state(&current_overscroll_gesture_, 956 base::AutoReset<OverscrollMode> reset_state(&current_overscroll_gesture_,
957 current_overscroll_gesture_); 957 current_overscroll_gesture_);
958 scoped_ptr<aura::Window> reset_window(overscroll_window_.release()); 958 scoped_ptr<aura::Window> reset_window(overscroll_window_.release());
959 } 959 }
960 960
961 OverscrollWindowDelegate* overscroll_delegate = new OverscrollWindowDelegate( 961 OverscrollWindowDelegate* overscroll_delegate = new OverscrollWindowDelegate(
962 web_contents_, 962 web_contents_,
963 current_overscroll_gesture_); 963 current_overscroll_gesture_);
964 overscroll_window_.reset(new aura::Window(overscroll_delegate)); 964 overscroll_window_.reset(new aura::Window(overscroll_delegate));
965 overscroll_window_->SetType(aura::client::WINDOW_TYPE_CONTROL); 965 overscroll_window_->SetType(ui::wm::WINDOW_TYPE_CONTROL);
966 overscroll_window_->SetTransparent(true); 966 overscroll_window_->SetTransparent(true);
967 overscroll_window_->Init(ui::LAYER_TEXTURED); 967 overscroll_window_->Init(ui::LAYER_TEXTURED);
968 overscroll_window_->layer()->SetMasksToBounds(false); 968 overscroll_window_->layer()->SetMasksToBounds(false);
969 overscroll_window_->SetName("OverscrollOverlay"); 969 overscroll_window_->SetName("OverscrollOverlay");
970 970
971 overscroll_change_brightness_ = overscroll_delegate->has_image(); 971 overscroll_change_brightness_ = overscroll_delegate->has_image();
972 window_->AddChild(overscroll_window_.get()); 972 window_->AddChild(overscroll_window_.get());
973 973
974 gfx::Rect bounds = gfx::Rect(window_->bounds().size()); 974 gfx::Rect bounds = gfx::Rect(window_->bounds().size());
975 if (ShouldNavigateForward(web_contents_->GetController(), 975 if (ShouldNavigateForward(web_contents_->GetController(),
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 1208
1209 void WebContentsViewAura::CreateView( 1209 void WebContentsViewAura::CreateView(
1210 const gfx::Size& initial_size, gfx::NativeView context) { 1210 const gfx::Size& initial_size, gfx::NativeView context) {
1211 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as 1211 // NOTE: we ignore |initial_size| since in some cases it's wrong (such as
1212 // if the bookmark bar is not shown and you create a new tab). The right 1212 // if the bookmark bar is not shown and you create a new tab). The right
1213 // value is set shortly after this, so its safe to ignore. 1213 // value is set shortly after this, so its safe to ignore.
1214 1214
1215 aura::Env::CreateInstance(); 1215 aura::Env::CreateInstance();
1216 window_.reset(new aura::Window(this)); 1216 window_.reset(new aura::Window(this));
1217 window_->set_owned_by_parent(false); 1217 window_->set_owned_by_parent(false);
1218 window_->SetType(aura::client::WINDOW_TYPE_CONTROL); 1218 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL);
1219 window_->SetTransparent(false); 1219 window_->SetTransparent(false);
1220 window_->Init(ui::LAYER_NOT_DRAWN); 1220 window_->Init(ui::LAYER_NOT_DRAWN);
1221 aura::Window* root_window = context ? context->GetRootWindow() : NULL; 1221 aura::Window* root_window = context ? context->GetRootWindow() : NULL;
1222 if (root_window) { 1222 if (root_window) {
1223 // There are places where there is no context currently because object 1223 // There are places where there is no context currently because object
1224 // hierarchies are built before they're attached to a Widget. (See 1224 // hierarchies are built before they're attached to a Widget. (See
1225 // views::WebView as an example; GetWidget() returns NULL at the point 1225 // views::WebView as an example; GetWidget() returns NULL at the point
1226 // where we are created.) 1226 // where we are created.)
1227 // 1227 //
1228 // It should be OK to not set a default parent since such users will 1228 // It should be OK to not set a default parent since such users will
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 event.location(), 1721 event.location(),
1722 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1722 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1723 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1723 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1724 if (drag_dest_delegate_) 1724 if (drag_dest_delegate_)
1725 drag_dest_delegate_->OnDrop(); 1725 drag_dest_delegate_->OnDrop();
1726 current_drop_data_.reset(); 1726 current_drop_data_.reset();
1727 return current_drag_op_; 1727 return current_drag_op_;
1728 } 1728 }
1729 1729
1730 } // namespace content 1730 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/aura/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698