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

Side by Side Diff: components/web_view/frame.cc

Issue 1462123002: views/mus: Set-up transient windows correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/web_view/frame.h" 5 #include "components/web_view/frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "components/mus/public/cpp/window.h" 14 #include "components/mus/public/cpp/window.h"
15 #include "components/mus/public/cpp/window_property.h" 15 #include "components/mus/public/cpp/window_property.h"
16 #include "components/web_view/frame_tree.h" 16 #include "components/web_view/frame_tree.h"
17 #include "components/web_view/frame_tree_delegate.h" 17 #include "components/web_view/frame_tree_delegate.h"
18 #include "components/web_view/frame_user_data.h" 18 #include "components/web_view/frame_user_data.h"
19 #include "components/web_view/frame_utils.h" 19 #include "components/web_view/frame_utils.h"
20 #include "mojo/application/public/interfaces/shell.mojom.h" 20 #include "mojo/application/public/interfaces/shell.mojom.h"
21 #include "mojo/common/url_type_converters.h" 21 #include "mojo/common/url_type_converters.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 using mus::Window; 24 using mus::Window;
25 25
26 DECLARE_WINDOW_PROPERTY_TYPE(web_view::Frame*); 26 MUS_DECLARE_WINDOW_PROPERTY_TYPE(web_view::Frame*);
27 27
28 namespace web_view { 28 namespace web_view {
29 29
30 // Used to find the Frame associated with a Window. 30 // Used to find the Frame associated with a Window.
31 DEFINE_LOCAL_WINDOW_PROPERTY_KEY(Frame*, kFrame, nullptr); 31 MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(Frame*, kFrame, nullptr);
32 32
33 namespace { 33 namespace {
34 34
35 const uint32_t kNoParentId = 0u; 35 const uint32_t kNoParentId = 0u;
36 const mus::ConnectionSpecificId kInvalidConnectionId = 0u; 36 const mus::ConnectionSpecificId kInvalidConnectionId = 0u;
37 37
38 mojom::FrameDataPtr FrameToFrameData(const Frame* frame) { 38 mojom::FrameDataPtr FrameToFrameData(const Frame* frame) {
39 mojom::FrameDataPtr frame_data(mojom::FrameData::New()); 39 mojom::FrameDataPtr frame_data(mojom::FrameData::New());
40 frame_data->frame_id = frame->id(); 40 frame_data->frame_id = frame->id();
41 frame_data->parent_id = frame->parent() ? frame->parent()->id() : kNoParentId; 41 frame_data->parent_id = frame->parent() ? frame->parent()->id() : kNoParentId;
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 final_update); 597 final_update);
598 } 598 }
599 599
600 void Frame::OnFindInPageSelectionUpdated(int32_t request_id, 600 void Frame::OnFindInPageSelectionUpdated(int32_t request_id,
601 int32_t active_match_ordinal) { 601 int32_t active_match_ordinal) {
602 tree_->delegate_->OnFindInPageSelectionUpdated(request_id, this, 602 tree_->delegate_->OnFindInPageSelectionUpdated(request_id, this,
603 active_match_ordinal); 603 active_match_ordinal);
604 } 604 }
605 605
606 } // namespace web_view 606 } // namespace web_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698