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

Side by Side Diff: components/html_viewer/html_frame_tree_manager.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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 | « components/html_viewer/html_frame.cc ('k') | components/html_viewer/input_events_unittest.cc » ('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 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/html_viewer/html_frame_tree_manager.h" 5 #include "components/html_viewer/html_frame_tree_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 on_connect_callback.Run(); 93 on_connect_callback.Run();
94 94
95 HTMLFrameTreeManager* frame_tree = 95 HTMLFrameTreeManager* frame_tree =
96 FindFrameTreeWithRoot(frame_data[0]->frame_id); 96 FindFrameTreeWithRoot(frame_data[0]->frame_id);
97 97
98 DCHECK(!frame_tree || change_id <= frame_tree->change_id_); 98 DCHECK(!frame_tree || change_id <= frame_tree->change_id_);
99 99
100 DVLOG(2) << "HTMLFrameTreeManager::CreateFrameAndAttachToTree " 100 DVLOG(2) << "HTMLFrameTreeManager::CreateFrameAndAttachToTree "
101 << " frame_tree=" << frame_tree << " use_existing=" 101 << " frame_tree=" << frame_tree << " use_existing="
102 << (window_connect_type == 102 << (window_connect_type ==
103 web_view::mojom::WINDOW_CONNECT_TYPE_USE_EXISTING) 103 web_view::mojom::WindowConnectType::USE_EXISTING)
104 << " frame_id=" << window_id; 104 << " frame_id=" << window_id;
105 if (window_connect_type == 105 if (window_connect_type == web_view::mojom::WindowConnectType::USE_EXISTING &&
106 web_view::mojom::WINDOW_CONNECT_TYPE_USE_EXISTING &&
107 !frame_tree) { 106 !frame_tree) {
108 DVLOG(1) << "was told to use existing window but do not have frame tree"; 107 DVLOG(1) << "was told to use existing window but do not have frame tree";
109 return nullptr; 108 return nullptr;
110 } 109 }
111 110
112 if (!frame_tree) { 111 if (!frame_tree) {
113 frame_tree = new HTMLFrameTreeManager(global_state); 112 frame_tree = new HTMLFrameTreeManager(global_state);
114 frame_tree->Init(delegate, window, frame_data, change_id); 113 frame_tree->Init(delegate, window, frame_data, change_id);
115 (*instances_)[frame_data[0]->frame_id] = frame_tree; 114 (*instances_)[frame_data[0]->frame_id] = frame_tree;
116 } else if (window_connect_type == 115 } else if (window_connect_type ==
117 web_view::mojom::WINDOW_CONNECT_TYPE_USE_EXISTING) { 116 web_view::mojom::WindowConnectType::USE_EXISTING) {
118 HTMLFrame* existing_frame = frame_tree->root_->FindFrame(window_id); 117 HTMLFrame* existing_frame = frame_tree->root_->FindFrame(window_id);
119 if (!existing_frame) { 118 if (!existing_frame) {
120 DVLOG(1) << "was told to use existing window but could not find window"; 119 DVLOG(1) << "was told to use existing window but could not find window";
121 return nullptr; 120 return nullptr;
122 } 121 }
123 if (!existing_frame->IsLocal()) { 122 if (!existing_frame->IsLocal()) {
124 DVLOG(1) << "was told to use existing window, but frame is remote"; 123 DVLOG(1) << "was told to use existing window, but frame is remote";
125 return nullptr; 124 return nullptr;
126 } 125 }
127 existing_frame->SwapDelegate(delegate); 126 existing_frame->SwapDelegate(delegate);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 402
404 for (const auto& child : node->children()) 403 for (const auto& child : node->children())
405 nodes.push(child); 404 nodes.push(child);
406 } 405 }
407 } 406 }
408 407
409 return new_local_frame; 408 return new_local_frame;
410 } 409 }
411 410
412 } // namespace mojo 411 } // namespace mojo
OLDNEW
« no previous file with comments | « components/html_viewer/html_frame.cc ('k') | components/html_viewer/input_events_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698