OLD | NEW |
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 "mash/browser_driver/browser_driver_application_delegate.h" | 5 #include "mash/browser_driver/browser_driver_application_delegate.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "components/mus/public/cpp/event_matcher.h" | 10 #include "components/mus/public/cpp/event_matcher.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } // namespace | 45 } // namespace |
46 | 46 |
47 BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate() | 47 BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate() |
48 : shell_(nullptr), | 48 : shell_(nullptr), |
49 binding_(this) {} | 49 binding_(this) {} |
50 | 50 |
51 BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {} | 51 BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {} |
52 | 52 |
53 void BrowserDriverApplicationDelegate::Initialize(mojo::Shell* shell, | 53 void BrowserDriverApplicationDelegate::Initialize(mojo::Shell* shell, |
54 const std::string& url, | 54 const std::string& url, |
55 uint32_t id) { | 55 uint32_t id, |
| 56 uint32_t user_id) { |
56 shell_ = shell; | 57 shell_ = shell; |
57 AddAccelerators(); | 58 AddAccelerators(); |
58 } | 59 } |
59 | 60 |
60 bool BrowserDriverApplicationDelegate::AcceptConnection( | 61 bool BrowserDriverApplicationDelegate::AcceptConnection( |
61 mojo::Connection* connection) { | 62 mojo::Connection* connection) { |
62 return true; | 63 return true; |
63 } | 64 } |
64 | 65 |
65 void BrowserDriverApplicationDelegate::OnAccelerator( | 66 void BrowserDriverApplicationDelegate::OnAccelerator( |
(...skipping 30 matching lines...) Expand all Loading... |
96 for (const AcceleratorSpec& spec : g_spec) { | 97 for (const AcceleratorSpec& spec : g_spec) { |
97 registrar->AddAccelerator( | 98 registrar->AddAccelerator( |
98 static_cast<uint32_t>(spec.id), | 99 static_cast<uint32_t>(spec.id), |
99 mus::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), | 100 mus::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), |
100 base::Bind(&AssertTrue)); | 101 base::Bind(&AssertTrue)); |
101 } | 102 } |
102 } | 103 } |
103 | 104 |
104 } // namespace browser_driver | 105 } // namespace browser_driver |
105 } // namespace main | 106 } // namespace main |
OLD | NEW |